1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-26 03:21:44 +03:00

qemu_migration.c: use g_auto* in qemuMigrationDstPrepareDirect()

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:45 -03:00 committed by Michal Privoznik
parent d9ea60c0a0
commit 51f1e7f2da

View File

@ -2810,10 +2810,10 @@ qemuMigrationDstPrepareDirect(virQEMUDriverPtr driver,
{
unsigned short port = 0;
bool autoPort = true;
char *hostname = NULL;
g_autofree char *hostname = NULL;
int ret = -1;
virURIPtr uri = NULL;
virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
g_autoptr(virURI) uri = NULL;
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
const char *migrateHost = cfg->migrateHost;
VIR_DEBUG("driver=%p, dconn=%p, cookiein=%s, cookieinlen=%d, "
@ -2928,9 +2928,6 @@ qemuMigrationDstPrepareDirect(virQEMUDriverPtr driver,
nmigrate_disks, migrate_disks, nbdPort,
migParams, flags);
cleanup:
virURIFree(uri);
VIR_FREE(hostname);
virObjectUnref(cfg);
if (ret != 0) {
VIR_FREE(*uri_out);
if (autoPort)