From: John Ferlan Date: Wed, 27 Aug 2014 19:06:56 +0000 (-0400) Subject: virsh-network: Resolve Coverity RESOURCE_LEAK X-Git-Tag: v1.2.8-rc2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=adedda2cc81862b54b9eb7f0c8a6a690fcbf818e;p=thirdparty%2Flibvirt.git virsh-network: Resolve Coverity RESOURCE_LEAK Need to free 'xmlFromFile' on/for the error path when current was returning false only --- diff --git a/tools/virsh-network.c b/tools/virsh-network.c index 578abe02c2..9497472541 100644 --- a/tools/virsh-network.c +++ b/tools/virsh-network.c @@ -974,7 +974,7 @@ cmdNetworkUpdate(vshControl *ctl, const vshCmd *cmd) if (current) { if (live || config) { vshError(ctl, "%s", _("--current must be specified exclusively")); - return false; + goto cleanup; } flags |= VIR_NETWORK_UPDATE_AFFECT_CURRENT; } else {