attach: replace closing helpers

parent b7e685d6
...@@ -104,9 +104,8 @@ static struct lxc_proc_context_info *lxc_proc_get_context_info(pid_t pid) ...@@ -104,9 +104,8 @@ static struct lxc_proc_context_info *lxc_proc_get_context_info(pid_t pid)
static inline void lxc_proc_close_ns_fd(struct lxc_proc_context_info *ctx) static inline void lxc_proc_close_ns_fd(struct lxc_proc_context_info *ctx)
{ {
for (int i = 0; i < LXC_NS_MAX; i++) { for (int i = 0; i < LXC_NS_MAX; i++)
__do_close_prot_errno int fd ATTR_UNUSED = move_fd(ctx->ns_fd[i]); close_prot_errno_disarm(ctx->ns_fd[i]);
}
} }
static void lxc_proc_put_context_info(struct lxc_proc_context_info *ctx) static void lxc_proc_put_context_info(struct lxc_proc_context_info *ctx)
...@@ -668,9 +667,8 @@ struct attach_clone_payload { ...@@ -668,9 +667,8 @@ struct attach_clone_payload {
static void lxc_put_attach_clone_payload(struct attach_clone_payload *p) static void lxc_put_attach_clone_payload(struct attach_clone_payload *p)
{ {
__do_close_prot_errno int ipc_socket ATTR_UNUSED = p->ipc_socket; close_prot_errno_disarm(p->ipc_socket);
__do_close_prot_errno int terminal_slave_fd ATTR_UNUSED = p->terminal_slave_fd; close_prot_errno_disarm(p->terminal_slave_fd);
if (p->init_ctx) { if (p->init_ctx) {
lxc_proc_put_context_info(p->init_ctx); lxc_proc_put_context_info(p->init_ctx);
p->init_ctx = NULL; p->init_ctx = NULL;
......
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