Merge pull request #426 from MabinGo/file_check
Add the file close operation before function return to release resource
This commit is contained in:
commit
b49bd705dc
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue