]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
virsh-network: Resolve Coverity RESOURCE_LEAK
authorJohn Ferlan <jferlan@redhat.com>
Wed, 27 Aug 2014 19:06:56 +0000 (15:06 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 28 Aug 2014 12:12:16 +0000 (08:12 -0400)
Need to free 'xmlFromFile' on/for the error path when current was
returning false only

tools/virsh-network.c

index 578abe02c224d876f2bd6a99ed9fda1a39be2c4b..9497472541f1892b8edf1c546626d17c0d281caf 100644 (file)
@@ -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 {