render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
43fe83
From 739e3d6333e8e02a9403be18502af9a8866b0c73 Mon Sep 17 00:00:00 2001
43fe83
Message-Id: <739e3d6333e8e02a9403be18502af9a8866b0c73.1379597660.git.jdenemar@redhat.com>
43fe83
From: Peter Krempa <pkrempa@redhat.com>
43fe83
Date: Wed, 18 Sep 2013 09:28:12 +0200
43fe83
Subject: [PATCH] qemu: Fix memleak after commit
43fe83
 59898a88ce8431bd3ea249b8789edc2ef9985827
43fe83
MIME-Version: 1.0
43fe83
Content-Type: text/plain; charset=UTF-8
43fe83
Content-Transfer-Encoding: 8bit
43fe83
43fe83
https://bugzilla.redhat.com/show_bug.cgi?id=1008340
43fe83
43fe83
If the ABI compatibility check with the "migratable" user XML is
43fe83
successful, we would leak the originally parsed XML from the user that
43fe83
would not be used in this case.
43fe83
43fe83
Reported by Ján Tomko.
43fe83
43fe83
(cherry picked from commit 044e3e75248f0346f9dfd181a90f7d16d69ed482)
43fe83
---
43fe83
 src/qemu/qemu_driver.c | 2 ++
43fe83
 1 file changed, 2 insertions(+)
43fe83
43fe83
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
43fe83
index 71d773c..53cb1ec 100644
43fe83
--- a/src/qemu/qemu_driver.c
43fe83
+++ b/src/qemu/qemu_driver.c
43fe83
@@ -5335,6 +5335,8 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver,
43fe83
             /* use the user provided XML */
43fe83
             newdef = def2;
43fe83
             def2 = NULL;
43fe83
+        } else {
43fe83
+            virDomainDefFree(def2);
43fe83
         }
43fe83
 
43fe83
         virDomainDefFree(def);
43fe83
-- 
43fe83
1.8.3.2
43fe83