From 8ac2dd562fe7fbc055cb8d7525b7255ee0c56847 Mon Sep 17 00:00:00 2001 From: brueffer Date: Mon, 14 Apr 2014 21:44:34 +0000 Subject: [PATCH] Fix double fclose() in an error case. CID: 1006120 Found with: Coverity Prevent(tm) MFC after: 1 week --- sbin/savecore/savecore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c index ca2dafd6c006..0f1d41ea83c1 100644 --- a/sbin/savecore/savecore.c +++ b/sbin/savecore/savecore.c @@ -672,7 +672,7 @@ DoFile(const char *savedir, const char *device) if (fclose(fp) < 0) { syslog(LOG_ERR, "error on %s: %m", corename); nerr++; - goto closeall; + goto closefd; } symlinks_remove();