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

[libvirt] [PATCH] virsh: Initialize vshData in cmdMigrate



If the virConnect did not succeeed, we called
virConnectClose on uninitialized data.

Introduced by commit 7eabd55.
---
 tools/virsh-domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Pushed as trivial.

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 2562326..fcfbf74 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -9122,7 +9122,7 @@ cmdMigrate(vshControl *ctl, const vshCmd *cmd)
     bool functionReturn = false;
     int timeout = 0;
     bool live_flag = false;
-    vshCtrlData data;
+    vshCtrlData data = { .dconn = NULL };
 
     if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
         return false;
-- 
1.8.5.5


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