[libvirt] [PATCH] Fix a qemuDomainPCIAddressSetFree memory leak
Eric Blake
eblake at redhat.com
Wed Apr 28 21:08:09 UTC 2010
On 04/28/2010 02:27 PM, Chris Lalancette wrote:
> 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 at redhat.com>
> ---
> src/qemu/qemu_conf.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
> index ed24916..5fa8c0a 100644
> --- a/src/qemu/qemu_conf.c
> +++ b/src/qemu/qemu_conf.c
> @@ -2110,7 +2110,7 @@ void qemuDomainPCIAddressSetFree(qemuDomainPCIAddressSetPtr addrs)
> return;
>
> virHashFree(addrs->used, qemuDomainPCIAddressSetFreeEntry);
> - addrs->used = NULL;
> + VIR_FREE(addrs);
ACK.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100428/b2452a84/attachment-0001.sig>
More information about the libvir-list
mailing list