Merge pull request #426 from MabinGo/file_check

Add the file close operation before function return to release resource
This commit is contained in:
Michael Crosby 2015-03-04 09:26:01 -08:00
commit b49bd705dc
1 changed files with 1 additions and 0 deletions

View File

@ -26,6 +26,7 @@ func notifyOnOOM(paths map[string]string) (<-chan struct{}, error) {
}
fd, _, syserr := syscall.RawSyscall(syscall.SYS_EVENTFD2, 0, syscall.FD_CLOEXEC, 0)
if syserr != 0 {
oomControl.Close()
return nil, syserr
}