From c285ffc4c2f042941acc44406bdd442252d1b0aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Tue, 26 Aug 2014 13:18:43 +0200 Subject: [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(-) 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;