daemon: virtlockd: Call virNetDaemonGetServer regardless of post exec

We need to call it anyway, so the else branch is redundant here.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
Erik Skultety 2017-11-14 14:35:51 +01:00
parent 700b0d2a2d
commit 996500d6fa

View File

@ -1325,10 +1325,11 @@ int main(int argc, char **argv) {
ret = VIR_LOCK_DAEMON_ERR_NETWORK;
goto cleanup;
}
} else if (rv == 1) {
srv = virNetDaemonGetServer(lockDaemon->dmn, "virtlockd");
virObjectUnref(srv);
}
srv = virNetDaemonGetServer(lockDaemon->dmn, "virtlockd");
if (timeout != -1) {
VIR_DEBUG("Registering shutdown timeout %d", timeout);
virNetDaemonAutoShutdown(lockDaemon->dmn,