mirror of
https://github.com/opencontainers/runc.git
synced 2025-10-09 17:30:06 +08:00
libcontainer: close seccomp agent connection to prevent resource leaks
Add missing defer conn.Close().
Signed-off-by: Pavel Liubimov <prlyubimov@gmail.com>
(cherry picked from commit aa0e7989c4
)
Signed-off-by: Pavel Liubimov <prlyubimov@gmail.com>
This commit is contained in:
@@ -872,6 +872,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