summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorMark McLoughlin2008-06-13 15:04:58 +0200
committerRusty Russell2008-07-29 01:58:33 +0200
commit34bdaab44dd5dac861b0d23bc29b147b569e5783 (patch)
tree15dfb12a794d9de9341a90af3a5f6358216eaec0 /Documentation
parentlguest: fix verbose printing of device features. (diff)
downloadkernel-qcow2-linux-34bdaab44dd5dac861b0d23bc29b147b569e5783.tar.gz
kernel-qcow2-linux-34bdaab44dd5dac861b0d23bc29b147b569e5783.tar.xz
kernel-qcow2-linux-34bdaab44dd5dac861b0d23bc29b147b569e5783.zip
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')
-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)
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;
}