From: Chen Hanxiao <chenhanxiao(a)gmail.com>
fix a mem leak
Signed-off-by: Chen Hanxiao <chenhanxiao(a)gmail.com>
---
src/qemu/qemu_driver.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 5c55c69af..14b72a8f6 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -20682,6 +20682,8 @@ qemuARPGetInterfaces(virDomainObjPtr vm,
if (VIR_APPEND_ELEMENT(ifaces_ret, ifaces_count, iface) < 0)
goto cleanup;
+
+ virDomainInterfaceFree(iface);
}
}
}
@@ -20691,6 +20693,7 @@ qemuARPGetInterfaces(virDomainObjPtr vm,
cleanup:
virArpTableFree(table);
+ virDomainInterfaceFree(iface);
if (ifaces_ret) {
for (i = 0; i < ifaces_count; i++)
--
2.14.3