Commit 8d11952f authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

serve_out_fd(): don't leak fd on error

Reported by Coverity, CID 51629.
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Acked-by: 's avatarAndrew Vagin <avagin@odin.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 5e82fba1
......@@ -844,12 +844,14 @@ static int serve_out_fd(int pid, int fd, struct file_desc *d)
if (ret) {
pr_err("Can't sent fd %d to %d\n", fd, fle->pid);
return -1;
goto out;
}
}
ret = 0;
out:
close(sock);
return 0;
return ret;
}
static int open_fd(int pid, struct fdinfo_list_entry *fle)
......
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