1
0
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:
Ruben S. Montero 2015-06-09 00:21:29 +02:00
parent bdb1e591da
commit c3741e4fa1

View File

@ -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;
}
}