[CRIU] [PATCH v2 13/13] pid_ns: Close sk in case of pid_ns_helper_sock() fails
Kirill Tkhai
ktkhai at virtuozzo.com
Tue May 16 09:27:22 PDT 2017
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
criu/namespaces.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/criu/namespaces.c b/criu/namespaces.c
index f9ab66be4..3473ab13b 100644
--- a/criu/namespaces.c
+++ b/criu/namespaces.c
@@ -2575,6 +2575,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;
}
More information about the CRIU
mailing list