Skip to content

Commit

Permalink
lguest: Don't leak /dev/zero fd
Browse files Browse the repository at this point in the history
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
Mark McLoughlin authored and Rusty Russell committed Jul 28, 2008
1 parent 32c68e5 commit 34bdaab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Documentation/lguest/lguest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 34bdaab

Please sign in to comment.