]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage: make previous leak less likely to regress
authorEric Blake <eblake@redhat.com>
Fri, 21 Oct 2011 22:44:52 +0000 (16:44 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 25 Oct 2011 01:42:49 +0000 (19:42 -0600)
commitb1836a254e3fda45cf754be283c1c37330574409
treef2a7211cad1d5a8af75362f1b4c5beb8dbca6322
parent79052a76b5783008193e9ac3ebb348208622c323
storage: make previous leak less likely to regress

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.
src/conf/storage_conf.c
src/conf/storage_conf.h
src/libvirt_private.syms
src/storage/storage_backend_fs.c
src/storage/storage_backend_iscsi.c
src/storage/storage_backend_logical.c
src/test/test_driver.c