storage: plug iscsi memory leak

Detected by Coverity.  virStoragePoolSourceFree does not free the
actual passed-in pointer.  A bigger patch would be to rename it
virStoragePoolSourceClear to match behavior, or even split it into
two functions depending on needed behavior; but this is the minimal
fix to the one location out of eight that leaked memory.

* src/storage/storage_backend_iscsi.c
(virStorageBackendISCSIFindPoolSources): Free memory.
This commit is contained in:
Eric Blake 2011-10-21 16:30:22 -06:00
parent 69d044c034
commit 79052a76b5

View File

@ -611,6 +611,7 @@ cleanup:
VIR_FREE(targets);
VIR_FREE(portal);
virStoragePoolSourceFree(source);
VIR_FREE(source);
return ret;
}