diff options
Diffstat (limited to 'usr.sbin/boot0cfg')
-rw-r--r-- | usr.sbin/boot0cfg/boot0cfg.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/boot0cfg/boot0cfg.c b/usr.sbin/boot0cfg/boot0cfg.c index 72baf46..935f85b 100644 --- a/usr.sbin/boot0cfg/boot0cfg.c +++ b/usr.sbin/boot0cfg/boot0cfg.c @@ -330,10 +330,12 @@ read_mbr(const char *disk, u_int8_t **mbr, int check_version) err(1, "%s", disk); if (n != mbr_size) errx(1, "%s: short read", disk); + close(fd); return (mbr_size); } *mbr = malloc(sizeof(buf)); memcpy(*mbr, buf, sizeof(buf)); + close(fd); return sizeof(buf); } |