start: fix mainloop cleanup goto statements

parent 2ee59756
...@@ -541,18 +541,18 @@ int lxc_poll(const char *name, struct lxc_handler *handler) ...@@ -541,18 +541,18 @@ int lxc_poll(const char *name, struct lxc_handler *handler)
close(descr.epfd); close(descr.epfd);
descr.epfd = -EBADF; descr.epfd = -EBADF;
if (ret < 0 || !handler->init_died) if (ret < 0 || !handler->init_died)
goto out_mainloop; goto out_mainloop_console;
ret = lxc_mainloop(&descr_console, 0); ret = lxc_mainloop(&descr_console, 0);
out_mainloop:
lxc_mainloop_close(&descr);
TRACE("Closed mainloop");
out_mainloop_console: out_mainloop_console:
lxc_mainloop_close(&descr_console); lxc_mainloop_close(&descr_console);
TRACE("Closed console mainloop"); TRACE("Closed console mainloop");
out_mainloop:
lxc_mainloop_close(&descr);
TRACE("Closed mainloop");
out_sigfd: out_sigfd:
close(handler->sigfd); close(handler->sigfd);
TRACE("Closed signal file descriptor %d", handler->sigfd); TRACE("Closed signal file descriptor %d", handler->sigfd);
......
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