From 35d31954d2794bd08e939b67af79aa8c650b1c26 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Mon, 6 Feb 2012 15:25:05 +0100 Subject: [PATCH] virsh: Fix resource leak while listing inactive domains with titles Commit fad5cd210899dfde4afe36712754dc921c3f3051 introduces a new flag that allows to show domain's title with domains. This commit introduced resource leak while listing inactive domains with titles. --- tools/virsh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh.c b/tools/virsh.c index 1613d2ebf2..d6fe680baf 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -1012,10 +1012,10 @@ cmdList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED) "-", names[i], state == -2 ? _("saved") : _(vshDomainStateToString(state))); + } virDomainFree(dom); VIR_FREE(names[i]); - } } ret = true;