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

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

 



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

--
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]