032100
From b35eb8dd4800be4dba22eb0a38da4d4d1c54521f Mon Sep 17 00:00:00 2001
032100
Message-Id: <b35eb8dd4800be4dba22eb0a38da4d4d1c54521f@dist-git>
032100
From: Jiri Denemark <jdenemar@redhat.com>
032100
Date: Wed, 27 Jul 2022 15:40:12 +0200
032100
Subject: [PATCH] qemu: Properly release job in qemuDomainSaveInternal
032100
032100
The function would fail to release the job in case
032100
qemuMigrationSrcIsAllowed failed.
032100
032100
Fixes v8.5.0-157-g69e0e33873
032100
032100
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
032100
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
032100
(cherry picked from commit 9c3d398df11024ef6c00a50c98fcc0f1f66c16a1)
032100
032100
https://bugzilla.redhat.com/show_bug.cgi?id=1497907
032100
032100
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
032100
---
032100
 src/qemu/qemu_driver.c | 2 +-
032100
 1 file changed, 1 insertion(+), 1 deletion(-)
032100
032100
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
032100
index 256e126ae1..ebd6365f52 100644
032100
--- a/src/qemu/qemu_driver.c
032100
+++ b/src/qemu/qemu_driver.c
032100
@@ -2655,7 +2655,7 @@ qemuDomainSaveInternal(virQEMUDriver *driver,
032100
         goto cleanup;
032100
 
032100
     if (!qemuMigrationSrcIsAllowed(driver, vm, false, VIR_ASYNC_JOB_SAVE, 0))
032100
-        goto cleanup;
032100
+        goto endjob;
032100
 
032100
     if (!virDomainObjIsActive(vm)) {
032100
         virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
032100
-- 
032100
2.35.1
032100