Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34bdaab4 authored by Mark McLoughlin's avatar Mark McLoughlin Committed by Rusty Russell
Browse files

lguest: Don't leak /dev/zero fd

parent 32c68e5c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
}