]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix a qemuDomainPCIAddressSetFree memory leak
authorChris Lalancette <clalance@redhat.com>
Wed, 28 Apr 2010 19:49:41 +0000 (15:49 -0400)
committerChris Lalancette <clalance@redhat.com>
Thu, 29 Apr 2010 13:16:14 +0000 (09:16 -0400)
qemuDomainPCIAddressSetFree was freeing up the hash
table for the pci addresses, but not freeing up the addr
structure.  Looking over the callers of this function, it
seems like they expect it to also free up the structure,
so do that here.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
src/qemu/qemu_conf.c

index ed24916a0c3bcb88a8f500e005037120eca8c897..5fa8c0aa1867e1f67153d72c5b37ba09157c968e 100644 (file)
@@ -2110,7 +2110,7 @@ void qemuDomainPCIAddressSetFree(qemuDomainPCIAddressSetPtr addrs)
         return;
 
     virHashFree(addrs->used, qemuDomainPCIAddressSetFreeEntry);
-    addrs->used = NULL;
+    VIR_FREE(addrs);
 }