diff options
author | Eric Blake <eblake@redhat.com> | 2011-10-21 16:44:52 -0600 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2011-10-24 19:42:49 -0600 |
commit | b1836a254e3fda45cf754be283c1c37330574409 (patch) | |
tree | f2a7211cad1d5a8af75362f1b4c5beb8dbca6322 /src/test | |
parent | storage: plug iscsi memory leak (diff) | |
download | libvirt-b1836a254e3fda45cf754be283c1c37330574409.tar.gz libvirt-b1836a254e3fda45cf754be283c1c37330574409.tar.bz2 libvirt-b1836a254e3fda45cf754be283c1c37330574409.zip |
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.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_driver.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/test/test_driver.c b/src/test/test_driver.c index b3e24b451..326409da0 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -4088,7 +4088,6 @@ testStorageFindPoolSources(virConnectPtr conn ATTRIBUTE_UNUSED, cleanup: virStoragePoolSourceFree(source); - VIR_FREE(source); return ret; } |