mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 11:31:16 +00:00
vmware: use g_auto in vmwareLoadDomains
Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
f7bdd27d2c
commit
4f1c1c9ff7
@ -118,14 +118,14 @@ vmwareLoadDomains(struct vmware_driver *driver)
|
|||||||
{
|
{
|
||||||
virDomainObj *vm = NULL;
|
virDomainObj *vm = NULL;
|
||||||
char *vmxPath = NULL;
|
char *vmxPath = NULL;
|
||||||
char *vmx = NULL;
|
g_autofree char *vmx = NULL;
|
||||||
vmwareDomainPtr pDomain;
|
vmwareDomainPtr pDomain;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
virVMXContext ctx;
|
virVMXContext ctx;
|
||||||
char *outbuf = NULL;
|
g_autofree char *outbuf = NULL;
|
||||||
char *str;
|
char *str;
|
||||||
char *saveptr = NULL;
|
char *saveptr = NULL;
|
||||||
virCommand *cmd;
|
g_autoptr(virCommand) cmd = NULL;
|
||||||
|
|
||||||
ctx.parseFileName = vmwareParseVMXFileName;
|
ctx.parseFileName = vmwareParseVMXFileName;
|
||||||
ctx.formatFileName = NULL;
|
ctx.formatFileName = NULL;
|
||||||
@ -178,9 +178,6 @@ vmwareLoadDomains(struct vmware_driver *driver)
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virCommandFree(cmd);
|
|
||||||
VIR_FREE(outbuf);
|
|
||||||
VIR_FREE(vmx);
|
|
||||||
virObjectUnref(vm);
|
virObjectUnref(vm);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user