mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
feature #3782: Remove snapshot list if empty
This commit is contained in:
parent
bdb1e591da
commit
c3741e4fa1
@ -4434,5 +4434,14 @@ void VirtualMachine::delete_disk_snapshot(int did, int snap_id)
|
||||
}
|
||||
|
||||
it->second->delete_snapshot(snap_id);
|
||||
|
||||
if (it->second->size() == 0)
|
||||
{
|
||||
Snapshots * tmp = it->second;
|
||||
|
||||
snapshots.erase(it);
|
||||
|
||||
delete tmp;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user