From: Christian Brauner Date: Fri, 27 Mar 2020 10:52:44 +0000 (+0100) Subject: attach: use close_prot_errno_disarm() X-Git-Tag: lxc-5.0.0~489^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8bc2b675f279cf201b7e5d45627c96be0a85c3c0;p=thirdparty%2Flxc.git attach: use close_prot_errno_disarm() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/attach.c b/src/lxc/attach.c index ca1fd2bd6..15cc5f379 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -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);