]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Use autoptr for mig in qemuMigrationDstPrepareFresh
authorJiri Denemark <jdenemar@redhat.com>
Tue, 10 May 2022 13:20:25 +0000 (15:20 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 7 Jun 2022 15:40:20 +0000 (17:40 +0200)
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_migration.c

index 71f7c78a5edd9e78e241bb286670966c433b2eb6..ab3c46fcadb31a8e8f625cdaec57d1d44f62bfed 100644 (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;