summaryrefslogtreecommitdiff
path: root/util/nvramtool/cbfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/nvramtool/cbfs.c')
-rw-r--r--util/nvramtool/cbfs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/nvramtool/cbfs.c b/util/nvramtool/cbfs.c
index febe0bed07..abd40eec12 100644
--- a/util/nvramtool/cbfs.c
+++ b/util/nvramtool/cbfs.c
@@ -144,6 +144,7 @@ void open_cbfs(const char *filename)
}
cbfs_mapped = mmap(NULL, cbfs_stat.st_size, PROT_READ | PROT_WRITE,
MAP_SHARED, cbfs_fd, 0);
+ close(cbfs_fd);
if (cbfs_mapped == MAP_FAILED) {
printf("Couldn't map '%s'\n", filename);
exit(-1);