Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
src/qemu/qemu_driver.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index fdbac9d21d..2198e7f1e9 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -11156,7 +11156,7 @@ qemuDomainMigratePrepareTunnel(virConnectPtr dconn,
virQEMUDriverPtr driver = dconn->privateData;
g_autoptr(virDomainDef) def = NULL;
g_autofree char *origname = NULL;
- qemuMigrationParamsPtr migParams = NULL;
+ g_autoptr(qemuMigrationParams) migParams = NULL;
int ret = -1;
virCheckFlags(QEMU_MIGRATION_FLAGS, -1);
@@ -11189,7 +11189,6 @@ qemuDomainMigratePrepareTunnel(virConnectPtr dconn,
st, &def, origname, migParams, flags);
cleanup:
- qemuMigrationParamsFree(migParams);
return ret;
}
@@ -11211,7 +11210,7 @@ qemuDomainMigratePrepare2(virConnectPtr dconn,
virQEMUDriverPtr driver = dconn->privateData;
g_autoptr(virDomainDef) def = NULL;
g_autofree char *origname = NULL;
- qemuMigrationParamsPtr migParams = NULL;
+ g_autoptr(qemuMigrationParams) migParams = NULL;
int ret = -1;
virCheckFlags(QEMU_MIGRATION_FLAGS, -1);
@@ -11254,7 +11253,6 @@ qemuDomainMigratePrepare2(virConnectPtr dconn,
migParams, flags);
cleanup:
- qemuMigrationParamsFree(migParams);
return ret;
}
@@ -11273,7 +11271,7 @@ qemuDomainMigratePerform(virDomainPtr dom,
virDomainObjPtr vm = NULL;
int ret = -1;
const char *dconnuri = NULL;
- qemuMigrationParamsPtr migParams = NULL;
+ g_autoptr(qemuMigrationParams) migParams = NULL;
virCheckFlags(QEMU_MIGRATION_FLAGS, -1);
@@ -11312,7 +11310,6 @@ qemuDomainMigratePerform(virDomainPtr dom,
cleanup:
virDomainObjEndAPI(&vm);
- qemuMigrationParamsFree(migParams);
return ret;
}
@@ -11598,7 +11595,7 @@ qemuDomainMigratePrepareTunnel3(virConnectPtr dconn,
virQEMUDriverPtr driver = dconn->privateData;
g_autoptr(virDomainDef) def = NULL;
g_autofree char *origname = NULL;
- qemuMigrationParamsPtr migParams = NULL;
+ g_autoptr(qemuMigrationParams) migParams = NULL;
int ret = -1;
virCheckFlags(QEMU_MIGRATION_FLAGS, -1);
@@ -11625,7 +11622,6 @@ qemuDomainMigratePrepareTunnel3(virConnectPtr dconn,
st, &def, origname, migParams, flags);
cleanup:
- qemuMigrationParamsFree(migParams);
return ret;
}
@@ -11645,7 +11641,7 @@ qemuDomainMigratePrepareTunnel3Params(virConnectPtr dconn,
const char *dom_xml = NULL;
const char *dname = NULL;
g_autofree char *origname = NULL;
- qemuMigrationParamsPtr migParams = NULL;
+ g_autoptr(qemuMigrationParams) migParams = NULL;
int ret = -1;
virCheckFlags(QEMU_MIGRATION_FLAGS, -1);
@@ -11682,7 +11678,6 @@ qemuDomainMigratePrepareTunnel3Params(virConnectPtr dconn,
st, &def, origname, migParams, flags);
cleanup:
- qemuMigrationParamsFree(migParams);
return ret;
}
@@ -12988,7 +12983,7 @@ qemuDomainMigrateGetMaxDowntime(virDomainPtr dom,
{
virQEMUDriverPtr driver = dom->conn->privateData;
virDomainObjPtr vm;
- qemuMigrationParamsPtr migParams = NULL;
+ g_autoptr(qemuMigrationParams) migParams = NULL;
int ret = -1;
int rc;
@@ -13029,7 +13024,6 @@ qemuDomainMigrateGetMaxDowntime(virDomainPtr dom,
qemuDomainObjEndJob(driver, vm);
cleanup:
- qemuMigrationParamsFree(migParams);
virDomainObjEndAPI(&vm);
return ret;
}
--
2.26.2