提交 d76267b2 编写于 作者: W Wang King 提交者: John Ferlan

esx: Fix memory leak

Variable def going out of scope leaks the storage def.source.hosts points to.
上级 77cc51a4
...@@ -513,6 +513,7 @@ esxStoragePoolGetXMLDesc(virStoragePoolPtr pool, unsigned int flags) ...@@ -513,6 +513,7 @@ esxStoragePoolGetXMLDesc(virStoragePoolPtr pool, unsigned int flags)
xml = virStoragePoolDefFormat(&def); xml = virStoragePoolDefFormat(&def);
cleanup: cleanup:
VIR_FREE(def.source.hosts);
esxVI_String_Free(&propertyNameList); esxVI_String_Free(&propertyNameList);
esxVI_ObjectContent_Free(&datastore); esxVI_ObjectContent_Free(&datastore);
esxVI_DatastoreHostMount_Free(&hostMount); esxVI_DatastoreHostMount_Free(&hostMount);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册