mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
69d044c034
commit
79052a76b5
|
@ -611,6 +611,7 @@ cleanup:
|
|||
VIR_FREE(targets);
|
||||
VIR_FREE(portal);
|
||||
virStoragePoolSourceFree(source);
|
||||
VIR_FREE(source);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue