[PATCH v1 11/25] qemu_migration_params.c: use g_autofree in qemuMigrationParamsApply()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>
---
 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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux