mirror of https://github.com/Icinga/icinga2.git
l_LegacyDowntimesCache: delete removed objects not to leak memory
This commit is contained in:
parent
c0f87dd4c9
commit
5f80ac17aa
|
@ -148,6 +148,12 @@ void Downtime::Start(bool runtimeCreated)
|
|||
|
||||
void Downtime::Stop(bool runtimeRemoved)
|
||||
{
|
||||
{
|
||||
std::unique_lock<std::mutex> lock (l_DowntimeMutex);
|
||||
|
||||
l_LegacyDowntimesCache.erase(GetLegacyId());
|
||||
}
|
||||
|
||||
GetCheckable()->UnregisterDowntime(this);
|
||||
|
||||
Downtime::Ptr parent = GetByName(GetParent());
|
||||
|
|
Loading…
Reference in New Issue