From: Zheng Chuan <zhengchuan(a)huawei.com>
virDomainDefPtr 'def' is forgot to free after qemuDomainDefFormatLive(), fix it.
Signed-off-by: Zheng Chuan <zhengchuan(a)huawei.com>
---
src/qemu/qemu_driver.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 53980d4..b145318 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -3369,6 +3369,7 @@ qemuDomainSaveInternal(virQEMUDriverPtr driver,
goto endjob;
}
xml = qemuDomainDefFormatLive(driver, priv->qemuCaps, def, NULL, true, true);
+ virDomainDefFree(def);
} else {
xml = qemuDomainDefFormatLive(driver, priv->qemuCaps, vm->def,
priv->origCPU, true, true);
--
1.8.3.1