diff options
author | Razvan Becheriu <razvan@isc.org> | 2024-02-20 09:56:43 +0100 |
---|---|---|
committer | Razvan Becheriu <razvan@isc.org> | 2024-02-21 11:03:52 +0100 |
commit | e94d19c989fe7671c5826b88c163e7a97a19d1d6 (patch) | |
tree | 00357c18bcab5408892274135215dbbddd283110 /src | |
parent | [#2022] Fixed comment (diff) | |
download | kea-e94d19c989fe7671c5826b88c163e7a97a19d1d6.tar.xz kea-e94d19c989fe7671c5826b88c163e7a97a19d1d6.zip |
[#3185] fixed access invalid iterator
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/perfdhcp/avalanche_scen.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bin/perfdhcp/avalanche_scen.cc b/src/bin/perfdhcp/avalanche_scen.cc index a4b187869a..376952c35f 100644 --- a/src/bin/perfdhcp/avalanche_scen.cc +++ b/src/bin/perfdhcp/avalanche_scen.cc @@ -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; } |