2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

unix: Do pr_perror() before cleanup

revert_unix_sk_cwd() may rewrite errno, so call pr_perror() firstly.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Kirill Tkhai
2017-03-28 18:55:44 +03:00
committed by Pavel Emelyanov
parent e2c64a942c
commit 61a3156e87

View File

@@ -956,8 +956,8 @@ static int post_open_unix_sk(struct file_desc *d, int fd)
if (connect(fd, (struct sockaddr *)&addr,
sizeof(addr.sun_family) +
peer->ue->name.len) < 0) {
revert_unix_sk_cwd(&cwd_fd, &root_fd);
pr_perror("Can't connect %#x socket", ui->ue->ino);
revert_unix_sk_cwd(&cwd_fd, &root_fd);
return -1;
}