diff options
| author | Warner Losh <imp@FreeBSD.org> | 2017-12-28 05:34:19 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2017-12-28 05:34:19 +0000 |
| commit | cd4461513c6697109e1ffeee190317e38e320297 (patch) | |
| tree | 9a1e6c3e56c8faca747b26ea8307ded6d182864f /sbin | |
| parent | 80c3f90ed4cebab720feea90a34d02f68373d32f (diff) | |
Notes
Diffstat (limited to 'sbin')
| -rw-r--r-- | sbin/newfs_msdos/mkfs_msdos.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sbin/newfs_msdos/mkfs_msdos.c b/sbin/newfs_msdos/mkfs_msdos.c index 5a6406ce4224..9459db65f04e 100644 --- a/sbin/newfs_msdos/mkfs_msdos.c +++ b/sbin/newfs_msdos/mkfs_msdos.c @@ -247,6 +247,7 @@ mkfs_msdos(const char *fname, const char *dtype, const struct msdos_options *op) 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 struct msdos_options *op) rv = 0; done: free(img); + close(fd); + close(fd1); return rv; } |
