* src/esx/esx_driver.c: remove leaks in esxDomainDumpXML() and simplify
esxDomainXMLFromNative()
}
cleanup:
+ esxVI_String_Free(&propertyNameList);
+ esxVI_ObjectContent_Free(&virtualMachine);
VIR_FREE(datastoreName);
VIR_FREE(vmxPath);
VIR_FREE(url);
VIR_FREE(vmx);
+ virDomainDefFree(def);
return xml;
if (STRNEQ(nativeFormat, "vmware-vmx")) {
ESX_ERROR(conn, VIR_ERR_INVALID_ARG,
"Unsupported config format '%s'", nativeFormat);
- goto cleanup;
+ return NULL;
}
def = esxVMX_ParseConfig(conn, nativeConfig);
xml = virDomainDefFormat(conn, def, VIR_DOMAIN_XML_INACTIVE);
}
-cleanup:
virDomainDefFree(def);
return xml;