[libvirt] [PATCH 2/2] storage: make previous leak less likely to regress

Laine Stump laine at laine.org
Mon Oct 24 23:58:41 UTC 2011


On 10/21/2011 06:46 PM, Eric Blake wrote:
> Splitting into two functions allows the user to call the right
> function, rather than having to remember that a *Free function is
> an exception to the rule.
>
> * src/conf/storage_conf.h (virStoragePoolSourceClear): New function.
> * src/libvirt_private.syms (storage_conf.h): Export it.
> * src/conf/storage_conf.c (virStoragePoolSourceFree): Split...
> (virStoragePoolSourceClear): ...into new function.
> (virStoragePoolDefFree, virStoragePoolDefParseSourceString):
> Update callers.
> * src/test/test_driver.c (testStorageFindPoolSources): Likewise.
> * src/storage/storage_backend_fs.c
> (virStorageBackendFileSystemNetFindPoolSourcesFunc)
> (virStorageBackendFileSystemNetFindPoolSources): Likewise.
> * src/storage/storage_backend_iscsi.c
> (virStorageBackendISCSIFindPoolSources): Likewise.
> * src/storage/storage_backend_logical.c
> (virStorageBackendLogicalFindPoolSources): Likewise.


ACK.




More information about the libvir-list mailing list