[libvirt] [PATCH] Don't free NULL network in cmdNetworkUpdate

Eric Blake eblake at redhat.com
Tue Aug 27 12:07:39 UTC 2013


On 08/27/2013 06:03 AM, Laine Stump wrote:
> On 08/26/2013 09:39 AM, Ján Tomko wrote:
>> If the network has not been found, virNetworkFree(NULL)
>> was called, resulting in an extra error:
>> error: invalid network pointer in virNetworkFree
> 
> 
> The patch is okay, but all vir*Free() functions should be NOPs when the
> argument is NULL.

All _internal_ vir*Free functions should be NOPs.  All public vir*Free
APIs (including virNetworkFree) are documented to explicitly fail on
NULL arguments (more precisely, on any argument not created by an
earlier API call), and we cannot change that behavior as it would be an
API change that violates back-compat.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

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


More information about the libvir-list mailing list