summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/acpi/acpidb/acpidb.c1
-rw-r--r--usr.sbin/bluetooth/bt3cfw/bt3cfw.c1
-rw-r--r--usr.sbin/boot0cfg/boot0cfg.c2
3 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/acpi/acpidb/acpidb.c b/usr.sbin/acpi/acpidb/acpidb.c
index 325dfae..2ffb696 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 aadb6b6..fcc8d1d 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 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);
}
OpenPOWER on IntegriCloud