pid_ns: Close sk in case of pid_ns_helper_sock() fails

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Kirill Tkhai 2017-05-16 19:27:22 +03:00 committed by Andrei Vagin
parent 943424a281
commit 81097c837b

View file

@ -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;
}