Skip to content

Commit

Permalink
attach: use close_prot_errno_disarm()
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Mar 27, 2020
1 parent 32908bf commit 8bc2b67
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lxc/attach.c
Expand Up @@ -1326,8 +1326,7 @@ int lxc_attach(struct lxc_container *container, lxc_attach_exec_t exec_function,
}

/* close unneeded file descriptors */
close(ipc_sockets[0]);
ipc_sockets[0] = -EBADF;
close_prot_errno_disarm(ipc_sockets[0]);

if (options->attach_flags & LXC_ATTACH_TERMINAL) {
lxc_attach_terminal_close_master(&terminal);
Expand Down

0 comments on commit 8bc2b67

Please sign in to comment.