]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
virsh: Initialize vshData in cmdMigrate
authorJán Tomko <jtomko@redhat.com>
Tue, 26 Aug 2014 11:18:43 +0000 (13:18 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 26 Aug 2014 11:20:47 +0000 (13:20 +0200)
If the virConnect did not succeeed, we called
virConnectClose on uninitialized data.

Introduced by commit 7eabd55.

tools/virsh-domain.c

index 2562326d2aef318ad057ff1ef5b3c0e2e1f5e2d8..fcfbf7430d63bd74a1f30c4c8a7195f61e76b650 100644 (file)
@@ -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;