Commit c1ad0f8f authored by Andrey Vagin's avatar Andrey Vagin Committed by Andrei Vagin

unit: don't check ui->ue->name.len twice in bind_unix_sk()

Acked-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 3347c6ef
...@@ -1349,7 +1349,6 @@ static int bind_unix_sk(int sk, struct unix_sk_info *ui) ...@@ -1349,7 +1349,6 @@ static int bind_unix_sk(int sk, struct unix_sk_info *ui)
addr.sun_family = AF_UNIX; addr.sun_family = AF_UNIX;
memcpy(&addr.sun_path, ui->name, ui->ue->name.len); memcpy(&addr.sun_path, ui->name, ui->ue->name.len);
if (ui->ue->name.len) {
if (ui->name[0] && prep_unix_sk_cwd(ui, &cwd_fd, NULL, &ns_fd)) if (ui->name[0] && prep_unix_sk_cwd(ui, &cwd_fd, NULL, &ns_fd))
return -1; return -1;
...@@ -1392,7 +1391,6 @@ static int bind_unix_sk(int sk, struct unix_sk_info *ui) ...@@ -1392,7 +1391,6 @@ static int bind_unix_sk(int sk, struct unix_sk_info *ui)
pr_perror("failed to unlink %s", ui->ue->name.data); pr_perror("failed to unlink %s", ui->ue->name.data);
goto done; goto done;
} }
}
if (ui->ue->state != TCP_LISTEN) { if (ui->ue->state != TCP_LISTEN) {
ui->bound = 1; ui->bound = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment