summaryrefslogtreecommitdiff
path: root/src/misc/mntent.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc/mntent.c')
-rw-r--r--src/misc/mntent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/misc/mntent.c b/src/misc/mntent.c
index 3eafba5e..a16d6525 100644
--- a/src/misc/mntent.c
+++ b/src/misc/mntent.c
@@ -10,7 +10,7 @@ FILE *setmntent(const char *name, const char *mode)
int endmntent(FILE *f)
{
- fclose(f);
+ if (f) fclose(f);
return 1;
}