From: Wang King Date: Wed, 12 Apr 2017 10:06:44 +0000 (+0800) Subject: esx: Fix memory leak X-Git-Tag: v3.3.0-rc1~172 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d76267b2e4fb7a2388625b7cd4037d7b69db23d9;p=thirdparty%2Flibvirt.git esx: Fix memory leak Variable def going out of scope leaks the storage def.source.hosts points to. --- diff --git a/src/esx/esx_storage_backend_vmfs.c b/src/esx/esx_storage_backend_vmfs.c index a1a660bfec..940e5d1f06 100644 --- a/src/esx/esx_storage_backend_vmfs.c +++ b/src/esx/esx_storage_backend_vmfs.c @@ -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);