[libvirt] [PATCH] hash: fix memory leak and regression
Eric Blake
eblake at redhat.com
Fri Apr 29 20:40:50 UTC 2011
On 04/29/2011 02:21 PM, Laine Stump wrote:
> On 04/29/2011 03:53 PM, Eric Blake wrote:
>> Commit 1671d1d introduced a memory leak in virHashFree, and
>> wholesale table corruption in virHashRemoveSet (elements not
>> requested to be freed are lost).
>>
>> * src/util/hash.c (virHashFree): Free bucket array.
>> (virHashRemoveSet): Don't lose elements.
>> * tests/hashtest.c (testHashCheckForEachCount): New method.
>> (testHashCheckCount): Expose the bug.
>> ---
>> src/util/hash.c | 6 +++---
>> tests/hashtest.c | 15 +++++++++++++++
>> 2 files changed, 18 insertions(+), 3 deletions(-)
> ACK.
Thanks; pushed.
--
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/20110429/305eee2c/attachment-0001.sig>
More information about the libvir-list
mailing list