Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Apr 2014 07:33:51 +0000 (UTC)
From:      Christian Brueffer <brueffer@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r264806 - stable/10/sbin/savecore
Message-ID:  <201404230733.s3N7XpMG092694@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brueffer
Date: Wed Apr 23 07:33:51 2014
New Revision: 264806
URL: http://svnweb.freebsd.org/changeset/base/264806

Log:
  MFC: r264479
  
  Fix double fclose() in an error case.
  
  CID:		1006120
  Found with:	Coverity Prevent(tm)

Modified:
  stable/10/sbin/savecore/savecore.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/savecore/savecore.c
==============================================================================
--- stable/10/sbin/savecore/savecore.c	Wed Apr 23 07:24:01 2014	(r264805)
+++ stable/10/sbin/savecore/savecore.c	Wed Apr 23 07:33:51 2014	(r264806)
@@ -672,7 +672,7 @@ DoFile(const char *savedir, const char *
 	if (fclose(fp) < 0) {
 		syslog(LOG_ERR, "error on %s: %m", corename);
 		nerr++;
-		goto closeall;
+		goto closefd;
 	}
 
 	symlinks_remove();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404230733.s3N7XpMG092694>