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:
Joshua Rogers
2025-10-06 06:13:20 +08:00
parent 80486a207f
commit 8c1b3f9608
+2 -2
View File
@@ -32,8 +32,8 @@ var (
)
func closeStateFds(recvFds []int) {
for i := range recvFds {
unix.Close(i)
for _, fd := range recvFds {
_ = unix.Close(fd)
}
}