openvz: use g_auto in openvzDomainMigratePerform3Params

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Ján Tomko 2021-12-13 19:27:02 +01:00
parent c5ae8135df
commit 7cd718cca5

View File

@ -2113,8 +2113,8 @@ openvzDomainMigratePerform3Params(virDomainPtr domain,
struct openvz_driver *driver = domain->conn->privateData;
virDomainObj *vm = NULL;
const char *uri_str = NULL;
virURI *uri = NULL;
virCommand *cmd = NULL;
g_autoptr(virURI) uri = NULL;
g_autoptr(virCommand) cmd = NULL;
int ret = -1;
virCheckFlags(OPENVZ_MIGRATION_FLAGS, -1);
@ -2146,8 +2146,6 @@ openvzDomainMigratePerform3Params(virDomainPtr domain,
ret = 0;
cleanup:
virCommandFree(cmd);
virURIFree(uri);
virDomainObjEndAPI(&vm);
return ret;
}