Re: [PATCH 3/5] Utilize virDomainDiskAuth for domain disk

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

 



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

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]