[PATCH] qemu: Fix memleak after commit 59898a88ce8431bd3ea249b8789edc2ef9985827

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

 



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

--
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]