Commit 4fc8bb0a authored by Kinsbursky Stanislav's avatar Kinsbursky Stanislav Committed by Cyrill Gorcunov

IPC: close image files after use

Signed-off-by: 's avatarStanislav Kinsbursky <skinsbursky@openvz.org>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent 427349c7
......@@ -651,7 +651,7 @@ static int prepare_ipc_sem(int pid)
return ret;
}
}
return 0;
return close_safe(&fd);
}
static int prepare_ipc_msg_queue_messages(int fd, const struct ipc_msg_entry *entry)
......@@ -764,7 +764,7 @@ static int prepare_ipc_msg(int pid)
return ret;
}
}
return 0;
return close_safe(&fd);
}
static int prepare_ipc_shm_pages(int fd, const struct ipc_shm_entry *shm)
......@@ -856,7 +856,7 @@ static int prepare_ipc_shm(int pid)
return ret;
}
}
return 0;
return close_safe(&fd);
}
static int prepare_ipc_var(int pid)
......@@ -877,7 +877,12 @@ static int prepare_ipc_var(int pid)
show_var_entry(&var);
return ipc_sysctl_req(&var, CTL_WRITE);
ret = ipc_sysctl_req(&var, CTL_WRITE);
if (ret < 0) {
pr_err("Failed to prepare IPC namespace variables\n");
return -EFAULT;
}
return close_safe(&fd);
}
int prepare_ipc_ns(int pid)
......
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