From: Christian Brauner Date: Fri, 16 Feb 2018 22:18:54 +0000 (+0100) Subject: start: don't call close on invalid file descriptor X-Git-Tag: lxc-2.0.10~326 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a376d63e7691e1dcc22647b2b31a45a886ee0a17;p=thirdparty%2Flxc.git start: don't call close on invalid file descriptor Signed-off-by: Christian Brauner --- diff --git a/src/lxc/start.c b/src/lxc/start.c index 473b8b99b..fb11688bd 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -630,7 +630,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)