]> xenbits.xensource.com Git - libvirt.git/commitdiff
esx: use g_autofree for datastoreRelatedPath
authorJán Tomko <jtomko@redhat.com>
Thu, 18 Feb 2021 12:52:27 +0000 (13:52 +0100)
committerJán Tomko <jtomko@redhat.com>
Thu, 18 Feb 2021 12:54:02 +0000 (13:54 +0100)
Reported by Coverity.

Fixes: 213662813cd846d045be8857dc7b917d33a40989
Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/esx/esx_driver.c

index e49975de86a363a27c7c050889882f4b64da20c6..96cc8bda0d4ec1c5c2e5693786bc094bca19ff06 100644 (file)
@@ -2886,7 +2886,7 @@ esxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
     g_autofree char *escapedName = NULL;
     g_auto(virBuffer) buffer = VIR_BUFFER_INITIALIZER;
     g_autofree char *url = NULL;
-    char *datastoreRelatedPath = NULL;
+    g_autofree char *datastoreRelatedPath = NULL;
     esxVI_String *propertyNameList = NULL;
     esxVI_ObjectContent *hostSystem = NULL;
     esxVI_ManagedObjectReference *resourcePool = NULL;