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
3bb044c807
commit
79647fe465
@ -219,6 +219,7 @@ os_overcommits_proc(void)
|
|||||||
return (false); /* Error. */
|
return (false); /* Error. */
|
||||||
|
|
||||||
nread = read(fd, &buf, sizeof(buf));
|
nread = read(fd, &buf, sizeof(buf));
|
||||||
|
close(fd);
|
||||||
if (nread < 1)
|
if (nread < 1)
|
||||||
return (false); /* Error. */
|
return (false); /* Error. */
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user