[PATCH 10/19] virsh-network: Resolve Coverity RESOURCE_LEAK

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Need to free 'xmlFromFile' on/for the error path when current was
returning false only

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 tools/virsh-network.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/virsh-network.c b/tools/virsh-network.c
index 578abe0..9497472 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 {
-- 
1.9.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]