aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/lguest
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2008-06-13 09:04:58 -0400
committerRusty Russell <rusty@rustcorp.com.au>2008-07-28 19:58:33 -0400
commit34bdaab44dd5dac861b0d23bc29b147b569e5783 (patch)
tree15dfb12a794d9de9341a90af3a5f6358216eaec0 /Documentation/lguest
parent32c68e5c569fdf016b494ce2fc8eecf59b6881bd (diff)
lguest: Don't leak /dev/zero fd
Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'Documentation/lguest')
-rw-r--r--Documentation/lguest/lguest.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c
index 6ded39bfdbdb..686e2d435c75 100644
--- a/Documentation/lguest/lguest.c
+++ b/Documentation/lguest/lguest.c
@@ -254,6 +254,7 @@ static void *map_zeroed_pages(unsigned int num)
254 PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, fd, 0); 254 PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, fd, 0);
255 if (addr == MAP_FAILED) 255 if (addr == MAP_FAILED)
256 err(1, "Mmaping %u pages of /dev/zero", num); 256 err(1, "Mmaping %u pages of /dev/zero", num);
257 close(fd);
257 258
258 return addr; 259 return addr;
259} 260}