From f1426d583ce46e0f57433ea6dc8bf14b58e21e07 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Wed, 13 May 2020 12:39:28 +0200 Subject: [PATCH] lxccontainer: use close_prot_errno_disarm() on state_socket_pair Signed-off-by: Christian Brauner --- src/lxc/lxccontainer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index ea70464ce..718b570d2 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -830,14 +830,12 @@ static bool wait_on_daemonized_start(struct lxc_handler *handler, int pid) DEBUG("First child %d exited", pid); /* Close write end of the socket pair. */ - close(handler->state_socket_pair[1]); - handler->state_socket_pair[1] = -1; + close_prot_errno_disarm(handler->state_socket_pair[1]); state = lxc_rcv_status(handler->state_socket_pair[0]); /* Close read end of the socket pair. */ - close(handler->state_socket_pair[0]); - handler->state_socket_pair[0] = -1; + close_prot_errno_disarm(handler->state_socket_pair[0]); if (state < 0) { SYSERROR("Failed to receive the container state"); -- 2.47.3