start: don't call close on invalid file descriptor

parent 586b1ce7
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment