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

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

 



On 04/15/2011 02:56 PM, Matthias Bolte wrote:
> 2011/4/14 Eric Blake <eblake@xxxxxxxxxx>:
>> * 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@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]