The function would fail to release the job in case
qemuMigrationSrcIsAllowed failed.

Fixes v8.5.0-157-g69e0e33873

Signed-off-by: Jiri Denemark <[email protected]>
---
 src/qemu/qemu_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 9013e6fb8d..019ec4a035 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -2656,7 +2656,7 @@ qemuDomainSaveInternal(virQEMUDriver *driver,
         goto cleanup;
 
     if (!qemuMigrationSrcIsAllowed(driver, vm, false, VIR_ASYNC_JOB_SAVE, 0))
-        goto cleanup;
+        goto endjob;
 
     if (!virDomainObjIsActive(vm)) {
         virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-- 
2.35.1

Reply via email to