1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

feature #3782: Add missing unlocks to failure exits

This commit is contained in:
Ruben S. Montero 2015-06-04 20:04:10 +02:00
parent 5510b56bd5
commit 480ad9178d

View File

@ -1709,12 +1709,15 @@ int DispatchManager::disk_snapshot_revert(
if (snaps == 0)
{
vm->unlock();
return -1;
}
if (snaps->get_active_id() == snap_id)
{
error_str = "Snapshot is already the active one";
vm->unlock();
return -1;
}
@ -1777,11 +1780,13 @@ int DispatchManager::disk_snapshot_delete(
if (snaps == 0)
{
vm->unlock();
return -1;
}
if (!snaps->test_delete(snap_id, error_str))
{
vm->unlock();
return -1;
}