From 50e2fb8055267d501df6e95820f4d9ef36eb6c04 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Tue, 11 Jul 1995 17:03:44 +0000 Subject: [PATCH] Remove a bogus fclose. Normally the "w" stream for /var/crash/bounds was fclosed twice and this didn't seem to cause any problems, but when /var/crash was on an an unwritable nfs-mounted partition, fclose(NULL) caused a core dump. --- sbin/savecore/savecore.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c index cb583b3aafea..cd106f05f166 100644 --- a/sbin/savecore/savecore.c +++ b/sbin/savecore/savecore.c @@ -350,7 +350,6 @@ err1: syslog(LOG_WARNING, "%s: %s", path, strerror(errno)); (void)fprintf(fp, "%d\n", bounds + 1); (void)fclose(fp); } - (void)fclose(fp); /* Create the core file. */ (void)snprintf(path, sizeof(path), "%s/vmcore.%d%s",