svn commit: r216095 - head/sbin/bsdlabel
Kevin Lo
kevlo at FreeBSD.org
Wed Dec 1 08:07:32 UTC 2010
Author: kevlo
Date: Wed Dec 1 08:07:32 2010
New Revision: 216095
URL: http://svn.freebsd.org/changeset/base/216095
Log:
Closing file descriptors when it's done
Modified:
head/sbin/bsdlabel/bsdlabel.c
Modified: head/sbin/bsdlabel/bsdlabel.c
==============================================================================
--- head/sbin/bsdlabel/bsdlabel.c Wed Dec 1 05:52:27 2010 (r216094)
+++ head/sbin/bsdlabel/bsdlabel.c Wed Dec 1 08:07:32 2010 (r216095)
@@ -370,10 +370,12 @@ readboot(void)
p[60] = (st.st_size + secsize - 1) / secsize;
p[61] = 1;
p[62] = 0;
+ close(fd);
return;
} else if ((!alphacksum) && st.st_size <= BBSIZE) {
if (read(fd, bootarea, st.st_size) != st.st_size)
err(1, "read error %s", xxboot);
+ close(fd);
return;
}
errx(1, "boot code %s is wrong size", xxboot);
More information about the svn-src-all
mailing list