[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCHv2 8/9] phyp: avoid memory leaks in command values



On 04/15/2011 02:56 PM, Matthias Bolte wrote:
> 2011/4/14 Eric Blake <eblake redhat com>:
>> * src/phyp/phyp_driver.c (phypExecBuffer): New function. Use it
>> throughout file for less code, and for plugging a few leaks.
>> ---
>>
>> Amazing how much copy-and-paste code this consolidated.
>>
>>                       " -p %s -o a -s %d -d 0 -a \"adapter_type=server\"",
>>                       vios_name, slot);
>> -    if (virBufferError(&buf)) {
>> -        virBufferFreeAndReset(&buf);
>> -        virReportOOMError();
>> -        goto cleanup;
>> -    }
>> -
>> -    VIR_FREE(cmd);
>> -    VIR_FREE(ret);
> 
> Why are you killing the VIR_FREE(ret) here, in the hunk before you
> left it in. It's necessary here too.

Accident of rebasing.  I had previously inserted VIR_FREE(ret) earlier
in the function, before your patch to independently fix leaks of ret,
and missed that my rebase was deleting your instances.

> 
> ACK, with that VIR_FREEs left in.

I've added those back in, and pushed 1-8.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]