Any error happening after the hand shake in the lxc controller
will not result in a failure as errors are checked during the handshake.
Move the handshake after the last possible error.
if (lxcControllerClearCapabilities() < 0)
goto cleanup;
- if (virLXCControllerDaemonHandshake(ctrl) < 0)
- goto cleanup;
-
for (i = 0; i < ctrl->nconsoles; i++)
if (virLXCControllerConsoleSetNonblocking(&(ctrl->consoles[i])) < 0)
goto cleanup;
+ if (virLXCControllerDaemonHandshake(ctrl) < 0)
+ goto cleanup;
+
/* We must not hold open a dbus connection for life
* of LXC instance, since dbus-daemon is limited to
* only a few 100 connections by default