mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 20:02:38 +09:00
feature #3782: Remove snapshot list if empty
This commit is contained in:
1 parent
bdb1e591da
commit
c3741e4fa1
1 file changed
+9
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user