[libvirt] [PATCH] esx: Fix memory leak

12 Apr
2017
12 Apr
'17
6:06 a.m.
Variable def going out of scope leaks the storage def.source.hosts points to. --- src/esx/esx_storage_backend_vmfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/esx/esx_storage_backend_vmfs.c b/src/esx/esx_storage_backend_vmfs.c index a1a660b..940e5d1 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); -- 2.8.3
3070
Age (days ago)
3071
Last active (days ago)
1 comments
2 participants
participants (2)
-
John Ferlan
-
Wang King