openvzDomainMigratePrepare3Params: use g_auto

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
Ján Tomko 2020-11-19 11:09:43 +01:00
parent 674b961d77
commit e15244a3c1

View File

@ -2067,9 +2067,9 @@ openvzDomainMigratePrepare3Params(virConnectPtr dconn,
const char *uri_in = NULL; const char *uri_in = NULL;
virDomainDefPtr def = NULL; virDomainDefPtr def = NULL;
virDomainObjPtr vm = NULL; virDomainObjPtr vm = NULL;
char *my_hostname = NULL; g_autofree char *my_hostname = NULL;
const char *hostname = NULL; const char *hostname = NULL;
virURIPtr uri = NULL; g_autoptr(virURI) uri = NULL;
int ret = -1; int ret = -1;
if (virTypedParamsValidate(params, nparams, OPENVZ_MIGRATION_PARAMETERS) < 0) if (virTypedParamsValidate(params, nparams, OPENVZ_MIGRATION_PARAMETERS) < 0)
@ -2146,8 +2146,6 @@ openvzDomainMigratePrepare3Params(virConnectPtr dconn,
virDomainObjListRemove(driver->domains, vm); virDomainObjListRemove(driver->domains, vm);
done: done:
VIR_FREE(my_hostname);
virURIFree(uri);
virDomainObjEndAPI(&vm); virDomainObjEndAPI(&vm);
return ret; return ret;
} }