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

[libvirt] [PATCH] qemu: Fix memleak after commit 59898a88ce8431bd3ea249b8789edc2ef9985827



If the ABI compatibility check with the "migratable" user XML is
successful, we would leak the originaly parsed XML from the user that
would not be used in this case.

Reported by Ján Tomko.
---
 src/qemu/qemu_driver.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 75348a1..0763f9b 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -5274,6 +5274,8 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver,
             /* use the user provided XML */
             newdef = def2;
             def2 = NULL;
+        } else {
+            virDomainDefFree(def2);
         }

         virDomainDefFree(def);
-- 
1.8.3.2


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