Skip to content

Commit

Permalink
Merge pull request #9899 from Icinga/icinga2-crashes-silently-9897
Browse files Browse the repository at this point in the history
IcingaDB#SendConfigDelete(): fix missing nullptr check before deref
  • Loading branch information
julianbrost authored Nov 21, 2023
2 parents 7fc7d05 + 7174dc8 commit d2a7117
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/icingadb/icingadb-objects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1577,6 +1577,9 @@ IcingaDB::CreateConfigUpdate(const ConfigObject::Ptr& object, const String typeN

void IcingaDB::SendConfigDelete(const ConfigObject::Ptr& object)
{
if (!m_Rcon || !m_Rcon->IsConnected())
return;

Type::Ptr type = object->GetReflectionType();
String typeName = type->GetName().ToLower();
String objectKey = GetObjectIdentifier(object);
Expand Down

0 comments on commit d2a7117

Please sign in to comment.