esx: Fix memory leak

Variable def going out of scope leaks the storage def.source.hosts points to.
This commit is contained in:
Wang King 2017-04-12 18:06:44 +08:00 committed by John Ferlan
parent 77cc51a482
commit d76267b2e4

View File

@ -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);