qemu: Use autoptr for mig in qemuMigrationDstPrepareFresh

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Jiri Denemark 2022-05-10 15:20:25 +02:00
parent 62181e8af6
commit 8e0d86fb6a

View File

@ -3299,7 +3299,7 @@ qemuMigrationDstPrepareFresh(virQEMUDriver *driver,
virErrorPtr origErr;
int ret = -1;
qemuDomainObjPrivate *priv = NULL;
qemuMigrationCookie *mig = NULL;
g_autoptr(qemuMigrationCookie) mig = NULL;
g_autofree char *xmlout = NULL;
unsigned int cookieFlags = 0;
bool taint_hook = false;
@ -3451,7 +3451,6 @@ qemuMigrationDstPrepareFresh(virQEMUDriver *driver,
qemuDomainRemoveInactive(driver, vm);
}
virDomainObjEndAPI(&vm);
qemuMigrationCookieFree(mig);
virErrorRestore(&origErr);
return ret;