mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
qemu: migration: Unlock vm on failed ACL check in protocol v2 APIs
Avoid leaving the domain locked on a failed ACL check in qemuDomainMigratePerform() and qemuDomainMigrateFinish2(). Introduced in commitabf75aea24
(Add ACL checks into the QEMU driver). (cherry picked from commit2bdcd29c71
)
This commit is contained in:
parent
f0905f7af3
commit
cd3d695a6b
@ -10701,8 +10701,10 @@ qemuDomainMigratePerform(virDomainPtr dom,
|
||||
if (!(vm = qemuDomObjFromDomain(dom)))
|
||||
goto cleanup;
|
||||
|
||||
if (virDomainMigratePerformEnsureACL(dom->conn, vm->def) < 0)
|
||||
if (virDomainMigratePerformEnsureACL(dom->conn, vm->def) < 0) {
|
||||
virObjectUnlock(vm);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (flags & VIR_MIGRATE_PEER2PEER) {
|
||||
dconnuri = uri;
|
||||
@ -10749,8 +10751,10 @@ qemuDomainMigrateFinish2(virConnectPtr dconn,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (virDomainMigrateFinish2EnsureACL(dconn, vm->def) < 0)
|
||||
if (virDomainMigrateFinish2EnsureACL(dconn, vm->def) < 0) {
|
||||
virObjectUnlock(vm);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Do not use cookies in v2 protocol, since the cookie
|
||||
* length was not sufficiently large, causing failures
|
||||
|
Loading…
Reference in New Issue
Block a user