Merge pull request #4800 from astrawind/seccomp-agent-conn-leak-12

[1.2] libcontainer: close seccomp agent connection to prevent resource leaks
This commit is contained in:
lfbzhm
2025-07-04 22:53:57 +08:00
committed by GitHub
+1
View File
@@ -871,6 +871,7 @@ func sendContainerProcessState(listenerPath string, state *specs.ContainerProces
if err != nil {
return fmt.Errorf("failed to connect with seccomp agent specified in the seccomp profile: %w", err)
}
defer conn.Close()
socket, err := conn.(*net.UnixConn).File()
if err != nil {