diff options
| author | Kevin Lo <kevlo@FreeBSD.org> | 2011-11-23 10:27:18 +0000 |
|---|---|---|
| committer | Kevin Lo <kevlo@FreeBSD.org> | 2011-11-23 10:27:18 +0000 |
| commit | de028133d41eb4da01c689c205164eeb060573ad (patch) | |
| tree | 0f2f3e671dd7714749793d35d1d678111be67f3b /usr.sbin | |
| parent | 85df37918418c7096d4997fa03a0b505f5c4ab52 (diff) | |
Notes
Diffstat (limited to 'usr.sbin')
| -rw-r--r-- | usr.sbin/acpi/acpidb/acpidb.c | 1 | ||||
| -rw-r--r-- | usr.sbin/bluetooth/bt3cfw/bt3cfw.c | 1 | ||||
| -rw-r--r-- | usr.sbin/boot0cfg/boot0cfg.c | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/acpi/acpidb/acpidb.c b/usr.sbin/acpi/acpidb/acpidb.c index 325dfae12a2c..2ffb69645f59 100644 --- a/usr.sbin/acpi/acpidb/acpidb.c +++ b/usr.sbin/acpi/acpidb/acpidb.c @@ -370,6 +370,7 @@ load_dsdt(const char *dsdtfile) } if (fstat(fd, &sb) == -1) { perror("fstat"); + close(fd); return (-1); } code = mmap(NULL, (size_t)sb.st_size, PROT_READ, MAP_PRIVATE, fd, (off_t)0); diff --git a/usr.sbin/bluetooth/bt3cfw/bt3cfw.c b/usr.sbin/bluetooth/bt3cfw/bt3cfw.c index aadb6b6b6762..fcc8d1d07df1 100644 --- a/usr.sbin/bluetooth/bt3cfw/bt3cfw.c +++ b/usr.sbin/bluetooth/bt3cfw/bt3cfw.c @@ -221,6 +221,7 @@ main(int argc, char *argv[]) free(firmware); firmware = NULL; + fclose(firmware_file); return (0); } diff --git a/usr.sbin/boot0cfg/boot0cfg.c b/usr.sbin/boot0cfg/boot0cfg.c index 72baf4690d0e..935f85b5998d 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); } |
