[libvirt] [PATCH 3/5] Utilize virDomainDiskAuth for domain disk

Ján Tomko jtomko at redhat.com
Thu Jul 3 08:39:54 UTC 2014


On 07/02/2014 05:44 PM, John Ferlan wrote:
> On 07/02/2014 09:10 AM, Ján Tomko wrote:
>> On 06/27/2014 05:11 PM, John Ferlan wrote:
>>> @@ -1802,7 +1790,7 @@ virStorageSourceClear(virStorageSourcePtr def)
>>>      VIR_FREE(def->timestamps);
>>>  
>>>      virStorageNetHostDefFree(def->nhosts, def->hosts);
>>> -    virStorageSourceAuthClear(def);
>>> +    virStorageAuthDefFree(def->auth);
>>
>> I don't like *Clear functions leaving pointers to freed memory behind, but
>> this one is only called right before freeing the StorageSource and it already
>> leaves def->hosts.
>>
> 
> I think you are asking for a 'def->auth = NULL;' right?

Yes.

> Similarly a 'def->hosts = NULL;' Of course it doesn't matter
> since we're freeing def anyway.  If you want it - I can put
> it there.

I think that's better left for a separate cleanup. I'll make a note on my TODO
list :)

Jan

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


More information about the libvir-list mailing list