[PATCH 2/2] daemon: virtlockd: Call virNetDaemonGetServer regardless of post exec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx>
---

It was either this or revert the order of the conditions so that the else
branch/block is actually the bigger one, complying with our guidelines.

 src/locking/lock_daemon.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c
index 0d5e999ef..6751b57bc 100644
--- a/src/locking/lock_daemon.c
+++ b/src/locking/lock_daemon.c
@@ -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,
--
2.13.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux