mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 01:34:11 +03:00
qemu: Do not return NULL when qemuMigrationSrcBegin succeeds
My recent commit v8.3.0-201-gc500955e95 tried to fix a regression which would cause the function to return success even if virCloseCallbacksSet failed. But due to a strange code flow in the function introduced an opposite regression. The function would return NULL on success when called without VIR_MIGRATE_CHANGE_PROTECTION flag. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
127fda5e84
commit
9c495f8fcb
@ -2534,23 +2534,23 @@ qemuMigrationSrcBegin(virConnectPtr conn,
|
||||
if (virCloseCallbacksSet(driver->closeCallbacks, vm, conn,
|
||||
qemuMigrationSrcCleanup) < 0)
|
||||
goto endjob;
|
||||
qemuMigrationJobContinue(vm);
|
||||
} else {
|
||||
goto endjob;
|
||||
}
|
||||
|
||||
ret = g_steal_pointer(&xml);
|
||||
|
||||
endjob:
|
||||
if (flags & VIR_MIGRATE_CHANGE_PROTECTION) {
|
||||
if (ret)
|
||||
qemuMigrationJobContinue(vm);
|
||||
else
|
||||
qemuMigrationJobFinish(vm);
|
||||
} else {
|
||||
qemuDomainObjEndJob(vm);
|
||||
}
|
||||
|
||||
cleanup:
|
||||
virDomainObjEndAPI(&vm);
|
||||
return ret;
|
||||
|
||||
endjob:
|
||||
if (flags & VIR_MIGRATE_CHANGE_PROTECTION)
|
||||
qemuMigrationJobFinish(vm);
|
||||
else
|
||||
qemuDomainObjEndJob(vm);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user