From 81097c837b08d0d4e7f28ae3a87ce060355ff74a Mon Sep 17 00:00:00 2001 From: Kirill Tkhai Date: Tue, 16 May 2017 19:27:22 +0300 Subject: [PATCH] pid_ns: Close sk in case of pid_ns_helper_sock() fails Signed-off-by: Kirill Tkhai Signed-off-by: Andrei Vagin --- criu/namespaces.c | 1 + 1 file changed, 1 insertion(+) diff --git a/criu/namespaces.c b/criu/namespaces.c index e5fbef1d2..d41126215 100644 --- a/criu/namespaces.c +++ b/criu/namespaces.c @@ -2581,6 +2581,7 @@ static int pid_ns_helper_sock(struct ns_id *ns) if (bind(sk, (struct sockaddr *)&addr, len) < 0) { pr_perror("Can't bind pid_ns sock"); + close(sk); return -1; }