libcontainer: close seccomp agent connection to prevent resource leaks

Add missing defer conn.Close().

Signed-off-by: Pavel Liubimov <prlyubimov@gmail.com>
This commit is contained in:
Pavel Liubimov
2025-07-01 12:22:07 +03:00
parent cdf9530701
commit aa0e7989c4
+1
View File
@@ -854,6 +854,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 {