Close file descriptor after reading "/proc/sys/vm/overcommit_memory".
This bug was introduced by c2f970c32b
(Modify pages_map() to support mapping uncommitted virtual memory.).
This resolves #399.
This commit is contained in:
parent
ea68cd25b6
commit
3c8c3e9e9b
@ -219,6 +219,7 @@ os_overcommits_proc(void)
|
||||
return (false); /* Error. */
|
||||
|
||||
nread = read(fd, &buf, sizeof(buf));
|
||||
close(fd);
|
||||
if (nread < 1)
|
||||
return (false); /* Error. */
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user