svn commit: r199860 - stable/8/sbin/fsck
Alexander Leidinger
netchild at FreeBSD.org
Fri Nov 27 10:53:47 UTC 2009
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);
More information about the svn-src-all
mailing list