mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
lguest: Don't leak /dev/zero fd
Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
32c68e5c56
commit
34bdaab44d
1 changed files with 1 additions and 0 deletions
|
@ -254,6 +254,7 @@ static void *map_zeroed_pages(unsigned int num)
|
|||
PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, fd, 0);
|
||||
if (addr == MAP_FAILED)
|
||||
err(1, "Mmaping %u pages of /dev/zero", num);
|
||||
close(fd);
|
||||
|
||||
return addr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue