[libvirt] [PATCH] Fix virQEMUCapsLoadCache leaks

Ján Tomko jtomko at redhat.com
Thu Mar 20 10:08:25 UTC 2014


On 03/19/2014 06:33 PM, Martin Kletzander wrote:
> On Wed, Mar 19, 2014 at 05:17:40PM +0100, Ján Tomko wrote:
>> Valgrind reported leaking of maxCpus and arch strings from
>> virXPathString, as well as the leak of the machineMaxCpus array.
>>
>> Use 'tmp' for the strings we don't want to free, to allow freeing
>> of 'str' in the cleanup label and free machineMaxCpus
>> in virCapsReset too.
>> ---
>>  src/qemu/qemu_capabilities.c | 18 +++++++++++-------
>>  1 file changed, 11 insertions(+), 7 deletions(-)
>>

> 
> ACK with the suggestions being optional to squash in.
> 

I've removed the 'tmp' variable and pushed it, thank you for the review.

Jan


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140320/692d55d1/attachment-0001.sig>


More information about the libvir-list mailing list