svn commit: r327275 - head/sbin/newfs_msdos
Warner Losh
imp at FreeBSD.org
Thu Dec 28 05:34:23 UTC 2017
Author: imp
Date: Thu Dec 28 05:34:19 2017
New Revision: 327275
URL: https://svnweb.freebsd.org/changeset/base/327275
Log:
Close fd and fd1 before returning now that we're done with them.
CID: 978234, 978236
Modified:
head/sbin/newfs_msdos/mkfs_msdos.c
Modified: head/sbin/newfs_msdos/mkfs_msdos.c
==============================================================================
--- head/sbin/newfs_msdos/mkfs_msdos.c Thu Dec 28 05:34:14 2017 (r327274)
+++ head/sbin/newfs_msdos/mkfs_msdos.c Thu Dec 28 05:34:19 2017 (r327275)
@@ -247,6 +247,7 @@ mkfs_msdos(const char *fname, const char *dtype, const
img = NULL;
rv = -1;
+ fd = fd1 = -1;
if (o.block_size && o.sectors_per_cluster) {
warnx("Cannot specify both block size and sectors per cluster");
@@ -716,6 +717,8 @@ mkfs_msdos(const char *fname, const char *dtype, const
rv = 0;
done:
free(img);
+ close(fd);
+ close(fd1);
return rv;
}
More information about the svn-src-head
mailing list