From: Hans Dedecker Date: Tue, 17 Oct 2017 11:40:41 +0000 (+0200) Subject: mount: fix SIGSEV crashes X-Git-Url: https://git.librecmc.org/?p=oweals%2Fmountd.git;a=commitdiff_plain;h=01bb2b09b1d34bec5841a3fa27e7a8696dcba869 mount: fix SIGSEV crashes Don't close file descriptor in case file descriptor is NULL Signed-off-by: Hans Dedecker --- diff --git a/mount.c b/mount.c index a7f1862..92606da 100644 --- a/mount.c +++ b/mount.c @@ -174,7 +174,6 @@ static int mount_check_disc(char *disc) if(!fp) { log_printf("error reading /proc/mounts"); - fclose(fp); return avail; } while((fgets(tmp, 256, fp) != NULL) && (avail == -1)) @@ -615,7 +614,6 @@ static void mount_check_mount_list(void) if(!fp) { log_printf("error reading /proc/mounts"); - fclose(fp); return; } mounted_count = 0;