diff options
Diffstat (limited to 'toys/posix/uniq.c')
-rw-r--r-- | toys/posix/uniq.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/toys/posix/uniq.c b/toys/posix/uniq.c index bd41d4af..3cfdb947 100644 --- a/toys/posix/uniq.c +++ b/toys/posix/uniq.c @@ -113,6 +113,8 @@ void uniq_main(void) print_line(outfile, prevline); if (CFG_TOYBOX_FREE) { + if (outfile != stdout) fclose(outfile); + if (infile != stdin) fclose(infile); free(prevline); free(thisline); } |