From 8bc2b675f279cf201b7e5d45627c96be0a85c3c0 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Fri, 27 Mar 2020 11:52:44 +0100 Subject: [PATCH] attach: use close_prot_errno_disarm() Signed-off-by: Christian Brauner --- src/lxc/attach.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); -- 2.47.2