From owner-svn-src-all@FreeBSD.ORG Wed Apr 23 07:35:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03D32C0F; Wed, 23 Apr 2014 07:35:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E492F1BA6; Wed, 23 Apr 2014 07:35:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3N7Z8Dj092913; Wed, 23 Apr 2014 07:35:08 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3N7Z8ND092912; Wed, 23 Apr 2014 07:35:08 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201404230735.s3N7Z8ND092912@svn.freebsd.org> From: Christian Brueffer Date: Wed, 23 Apr 2014 07:35:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264807 - stable/9/sbin/savecore X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 07:35:09 -0000 Author: brueffer Date: Wed Apr 23 07:35:08 2014 New Revision: 264807 URL: http://svnweb.freebsd.org/changeset/base/264807 Log: MFC: r264479 Fix double fclose() in an error case. CID: 1006120 Found with: Coverity Prevent(tm) Modified: stable/9/sbin/savecore/savecore.c Directory Properties: stable/9/sbin/savecore/ (props changed) Modified: stable/9/sbin/savecore/savecore.c ============================================================================== --- stable/9/sbin/savecore/savecore.c Wed Apr 23 07:33:51 2014 (r264806) +++ stable/9/sbin/savecore/savecore.c Wed Apr 23 07:35:08 2014 (r264807) @@ -603,7 +603,7 @@ DoFile(const char *savedir, const char * if (fclose(fp) < 0) { syslog(LOG_ERR, "error on %s: %m", filename); nerr++; - goto closeall; + goto closefd; } nsaved++;