Close fd and fd1 before returning now that we're done with them.
CID: 978234, 978236
This commit is contained in:
parent
80c3f90ed4
commit
cd4461513c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=327275
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user