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