forked from luck/tmp_suning_uos_patched
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
@ -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 New Issue
Block a user