mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53: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>
(cherry picked from commit 8c1b3f9608)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
committed by
Kir Kolyshkin
parent
bf5aeecc03
commit
0b8a41e38f
@@ -27,8 +27,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