Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
src/qemu/qemu_migration_params.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c
index b1518f82c0..aea17b1ac8 100644
--- a/src/qemu/qemu_migration_params.c
+++ b/src/qemu/qemu_migration_params.c
@@ -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;
}
--
2.26.2