2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 13:37:55 +00:00

[#3185] fixed access invalid iterator

This commit is contained in:
Razvan Becheriu
2024-02-20 10:56:43 +02:00
parent ae5d15da89
commit e94d19c989

View File

@@ -44,9 +44,10 @@ AvalancheScen::resendPackets(ExchangeType xchg_type) {
auto start_time = pkt->getTimestamp();
int current_pkt_resent_cnt = 0;
auto r_it = retrans.find(trans_id);
if (r_it != retrans.end()) {
start_time = (*start_times.find(trans_id)).second;
current_pkt_resent_cnt = (*r_it).second;
auto s_it = start_times.find(trans_id);
if (r_it != retrans.end() && s_it != start_times.end()) {
start_time = s_it->second;
current_pkt_resent_cnt = r_it->second;
} else {
start_times[trans_id] = start_time;
}