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:
Jason Evans 2016-09-26 15:55:40 -07:00
parent 3bb044c807
commit 79647fe465

View File

@ -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. */
/*