qemu_migration_params.c: use g_autofree in qemuMigrationParamsApply()

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Daniel Henrique Barboza 2020-07-13 06:49:43 -03:00 committed by Michal Privoznik
parent 769de4695b
commit b75ff9a194

View File

@ -836,8 +836,8 @@ qemuMigrationParamsApply(virQEMUDriverPtr driver,
{
qemuDomainObjPrivatePtr priv = vm->privateData;
bool xbzrleCacheSize_old = false;
virJSONValuePtr params = NULL;
virJSONValuePtr caps = NULL;
g_autoptr(virJSONValue) params = NULL;
g_autoptr(virJSONValue) caps = NULL;
qemuMigrationParam xbzrle = QEMU_MIGRATION_PARAM_XBZRLE_CACHE_SIZE;
int ret = -1;
int rc;
@ -896,9 +896,6 @@ qemuMigrationParamsApply(virQEMUDriverPtr driver,
if (xbzrleCacheSize_old)
migParams->params[xbzrle].set = true;
virJSONValueFree(params);
virJSONValueFree(caps);
return ret;
}