[libvirt] [PATCH 4/4] virsh: initialize info in cmdIOThreadInfo

Ján Tomko jtomko at redhat.com
Tue Feb 12 11:06:23 UTC 2019


Although it is not needed at the moment, do not rely on a value being
set before the first jump to cleanup.

Signed-off-by: Ján Tomko <jtomko at redhat.com>
---
 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 516b647401..825c07ac96 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -7532,7 +7532,7 @@ cmdIOThreadInfo(vshControl *ctl, const vshCmd *cmd)
     bool live = vshCommandOptBool(cmd, "live");
     bool current = vshCommandOptBool(cmd, "current");
     size_t niothreads = 0;
-    virDomainIOThreadInfoPtr *info;
+    virDomainIOThreadInfoPtr *info = NULL;
     size_t i;
     unsigned int flags = VIR_DOMAIN_AFFECT_CURRENT;
     vshTablePtr table = NULL;
-- 
2.19.2




More information about the libvir-list mailing list