]> git.proxmox.com Git - mirror_lxc.git/blobdiff - src/lxc/start.c
start: don't call close on invalid file descriptor
[mirror_lxc.git] / src / lxc / start.c
index b90d5ea00a063a1f435e15a2e4863e225efcf0fd..a64f6b64c47dfc3b51141200dd94bbff90e96f78 100644 (file)
@@ -628,7 +628,7 @@ void lxc_free_handler(struct lxc_handler *handler)
        lxc_put_nsfds(handler);
 
        if (handler->conf && handler->conf->reboot == 0)
-               if (handler->conf->maincmd_fd)
+               if (handler->conf->maincmd_fd >= 0)
                        close(handler->conf->maincmd_fd);
 
        if (handler->state_socket_pair[0] >= 0)