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

Re: [libvirt] [PATCHv3 2/4] net-dhcp-leases: Implement the remote protocol



On 09/16/2013 12:01 PM, Nehal J Wani wrote:

>> +
>> +    for (i = 0; i < nleases; i++) {
>> +        virNetworkDHCPLeasesPtr lease = leases[i];
>> +        remote_network_dhcp_lease *lease_ret =
> &(ret->leases.leases_val[i]);

>> +error:
>> +    for (i = 0; i < nleases; i++) {
>> +        remote_network_dhcp_lease *lease_ret =
> &(ret->leases.leases_val[i]);
>> +        virNetworkDHCPLeaseFree((virNetworkDHCPLeasesPtr)lease_ret);
> 
> [1]

Don't do that.  lease_ret is NOT an abi-compatible struct with
virNetworkDHCPLeasesPtr.  You'll have to manually free the individual
components, or use xdr_free().

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
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]