From: Ján Tomko Date: Tue, 26 Aug 2014 11:18:43 +0000 (+0200) Subject: virsh: Initialize vshData in cmdMigrate X-Git-Tag: v1.2.8-rc1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c285ffc4c2f042941acc44406bdd442252d1b0aa;p=thirdparty%2Flibvirt.git virsh: Initialize vshData in cmdMigrate If the virConnect did not succeeed, we called virConnectClose on uninitialized data. Introduced by commit 7eabd55. --- diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 2562326d2a..fcfbf7430d 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;