nvramtool: Close file after use
mmap builds a new reference to the file, so the file descriptor isn't necessary anymore. Close it. Change-Id: I639fd13ff8f13cbdfce1d199d75744e56f2b19b3 Found-by: Coverity Scan Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/6475 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
parent
5fc04d1fdd
commit
edb0a61be4
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue