mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Merge pull request #426 from MabinGo/file_check
Add the file close operation before function return to release resource
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user