mirror of
https://github.com/opencontainers/runc.git
synced 2026-04-24 00:30:44 +08:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user