[libvirt] [PATCH 3/5] Add callback to virNetClient to be invoked on connection close

Eric Blake eblake at redhat.com
Fri Jul 20 15:59:19 UTC 2012


On 07/20/2012 08:18 AM, Daniel P. Berrange wrote:
>>> @@ -463,6 +480,9 @@ void virNetClientFree(virNetClientPtr client)
>>>          return;
>>>      }
>>>  
>>> +    if (client->closeFf && client->closeOpaque)
>>> +        client->closeFf(client->closeOpaque);
>>
>> Again, you should not be forcing closeOpaque to be non-NULL.  It's
>> opaque, after all.
> 
> If opaque is NULL, then there's nothing that needs free'ing.

Maybe nothing to free, but there may still be side effects (such as
logging) in the closeFf that the caller still wants to have happen.

-- 
Eric Blake   eblake at 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: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120720/f3bc8bfc/attachment-0001.sig>


More information about the libvir-list mailing list