mirror of https://gitee.com/openkylin/libvirt.git
esx: Fix memory leak
Variable def going out of scope leaks the storage def.source.hosts points to.
This commit is contained in:
parent
77cc51a482
commit
d76267b2e4
src/esx
|
@ -513,6 +513,7 @@ esxStoragePoolGetXMLDesc(virStoragePoolPtr pool, unsigned int flags)
|
|||
xml = virStoragePoolDefFormat(&def);
|
||||
|
||||
cleanup:
|
||||
VIR_FREE(def.source.hosts);
|
||||
esxVI_String_Free(&propertyNameList);
|
||||
esxVI_ObjectContent_Free(&datastore);
|
||||
esxVI_DatastoreHostMount_Free(&hostMount);
|
||||
|
|
Loading…
Reference in New Issue