lte: Check iterator before dereferencing

This commit is contained in:
Ivey
2024-11-19 12:25:16 -05:00
committed by Gabriel Ferreira
parent da99634c29
commit 6f4d674090

View File

@@ -48,8 +48,11 @@ EpcPgwApplication::UeInfo::RemoveBearer(uint8_t bearerId)
{ {
NS_LOG_FUNCTION(this << (uint16_t)bearerId); NS_LOG_FUNCTION(this << (uint16_t)bearerId);
auto it = m_teidByBearerIdMap.find(bearerId); auto it = m_teidByBearerIdMap.find(bearerId);
if (it != m_teidByBearerIdMap.end())
{
m_tftClassifier.Delete(it->second); // delete tft m_tftClassifier.Delete(it->second); // delete tft
m_teidByBearerIdMap.erase(bearerId); m_teidByBearerIdMap.erase(bearerId);
}
} }
uint32_t uint32_t