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-3.0.0.beta1~25^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d0d3655167f9658d0e19f775cfd20cdc52cd906;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 b90d5ea00..a64f6b64c 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -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)