From owner-svn-src-all@FreeBSD.ORG Fri Nov 27 10:53:47 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B1A61065676; Fri, 27 Nov 2009 10:53:47 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A5DB8FC23; Fri, 27 Nov 2009 10:53:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nARArkEx017717; Fri, 27 Nov 2009 10:53:46 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nARArkRL017716; Fri, 27 Nov 2009 10:53:46 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <200911271053.nARArkRL017716@svn.freebsd.org> From: Alexander Leidinger Date: Fri, 27 Nov 2009 10:53:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199860 - stable/8/sbin/fsck X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 27 Nov 2009 10:53:47 -0000 Author: netchild Date: Fri Nov 27 10:53:46 2009 New Revision: 199860 URL: http://svn.freebsd.org/changeset/base/199860 Log: MFC r199582: Fix minor resource leak in a function which was introduced by changing an err() to a return in r106254. Modified: stable/8/sbin/fsck/fsck.c Directory Properties: stable/8/sbin/fsck/ (props changed) Modified: stable/8/sbin/fsck/fsck.c ============================================================================== --- stable/8/sbin/fsck/fsck.c Fri Nov 27 07:55:39 2009 (r199859) +++ stable/8/sbin/fsck/fsck.c Fri Nov 27 10:53:46 2009 (r199860) @@ -543,8 +543,10 @@ getfslab(const char *str) if ((fd = open(str, O_RDONLY)) == -1) err(1, "cannot open `%s'", str); - if (ioctl(fd, DIOCGDINFO, &dl) == -1) + if (ioctl(fd, DIOCGDINFO, &dl) == -1) { + (void) close(fd); return(NULL); + } (void) close(fd);