diff options
author | kevlo <kevlo@FreeBSD.org> | 2011-11-23 10:27:18 +0000 |
---|---|---|
committer | kevlo <kevlo@FreeBSD.org> | 2011-11-23 10:27:18 +0000 |
commit | 2fca8765a2f8f21d5d59ea3a791e5ca51fba50dc (patch) | |
tree | 0f2f3e671dd7714749793d35d1d678111be67f3b /usr.sbin/boot0cfg | |
parent | 636924cae77a11f6f84663fada352e6c5ee88715 (diff) | |
download | FreeBSD-src-2fca8765a2f8f21d5d59ea3a791e5ca51fba50dc.zip FreeBSD-src-2fca8765a2f8f21d5d59ea3a791e5ca51fba50dc.tar.gz |
Plug fd leaks
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); } |