summaryrefslogtreecommitdiff
path: root/editors/sed.c
diff options
context:
space:
mode:
Diffstat (limited to 'editors/sed.c')
-rw-r--r--editors/sed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/sed.c b/editors/sed.c
index c1ee750..19e7683 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -1338,7 +1338,7 @@ int sed_main(int argc UNUSED_PARAM, char **argv)
nonstdoutfd = mkstemp(G.outname);
if (-1 == nonstdoutfd)
bb_perror_msg_and_die("can't create temp file %s", G.outname);
- G.nonstdout = fdopen(nonstdoutfd, "w");
+ G.nonstdout = xfdopen_for_write(nonstdoutfd);
/* Set permissions/owner of output file */
fstat(fileno(file), &statbuf);