]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxccontainer: use close_prot_errno_disarm() on state_socket_pair
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 13 May 2020 10:39:28 +0000 (12:39 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 13 May 2020 10:39:28 +0000 (12:39 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/lxccontainer.c

index ea70464ce78b1597f62bae21017c68eab4c0e644..718b570d2e4085083243ed64028eebee9b612751 100644 (file)
@@ -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");