[libvirt PATCH] esx: use g_autofree for datastoreRelatedPath

Ján Tomko posted 1 patch 3 years, 2 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/e2ee16dcd326f61212841e0ca2868d04cf49ab66.1613652861.git.jtomko@redhat.com
src/esx/esx_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt PATCH] esx: use g_autofree for datastoreRelatedPath
Posted by Ján Tomko 3 years, 2 months ago
Reported by Coverity.

Fixes: 213662813cd846d045be8857dc7b917d33a40989
Signed-off-by: Ján Tomko <jtomko@redhat.com>
---
Pushed as trivial.

 src/esx/esx_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index e49975de86..96cc8bda0d 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -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;
-- 
2.26.2