Commit bb5bba53 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

parasie-syscall: Use close_safe to escape calling close on negative fd

CID 1042293
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 6df067c5
......@@ -783,7 +783,7 @@ int parasite_get_proc_fd_seized(struct parasite_ctl *ctl)
if (fd < 0)
pr_err("Can't retrieve FD from socket\n");
if (__parasite_wait_daemon_ack(PARASITE_CMD_GET_PROC_FD, ctl)) {
close(fd);
close_safe(&fd);
return -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