mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
fix(seccompagent): close received FDs, not loop index
Prevents accidentally closing 0/1/2 on error paths. Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
This commit is contained in:
@@ -32,8 +32,8 @@ var (
|
||||
)
|
||||
|
||||
func closeStateFds(recvFds []int) {
|
||||
for i := range recvFds {
|
||||
unix.Close(i)
|
||||
for _, fd := range recvFds {
|
||||
_ = unix.Close(fd)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user