]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Don't leak hostcpu or hostnuma on driver cleanup
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 17 Dec 2019 18:34:41 +0000 (19:34 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 18 Dec 2019 13:28:48 +0000 (14:28 +0100)
When freeing qemu driver struct members, we forgot to free
@hostcpu and @hostnuma members.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
src/qemu/qemu_driver.c

index 0b9e31b344a14ad8c87c01b708a8b5abef56141e..ec8faf384cf4159499a97f6fb7e59919aa533b6b 100644 (file)
@@ -1135,6 +1135,8 @@ qemuStateCleanup(void)
     virObjectUnref(qemu_driver->domainEventState);
     virObjectUnref(qemu_driver->qemuCapsCache);
     virObjectUnref(qemu_driver->xmlopt);
+    virCPUDefFree(qemu_driver->hostcpu);
+    virCapabilitiesHostNUMAUnref(qemu_driver->hostnuma);
     virObjectUnref(qemu_driver->caps);
     ebtablesContextFree(qemu_driver->ebtables);
     VIR_FREE(qemu_driver->qemuImgBinary);