summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--lib/fs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/fs.c b/lib/fs.c
index f8888c5..261094e 100644
--- a/lib/fs.c
+++ b/lib/fs.c
@@ -710,7 +710,10 @@ static void close_proc(void *ud) {
}
static void close_file(void *ud) {
- fclose((FILE *)ud);
+ FILE *fp = ud;
+
+ if (fp != stdin && fp != stdout && fp != stderr)
+ fclose(fp);
}
static void close_dir(void *ud) {