Skip to content

Commit 6a661df

Browse files
committed
++ cache
1 parent b61451b commit 6a661df

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

storage/cache.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ void NHTFlowCache::finish()
181181
if (m_flow_table[i]->is_in_ctt && !m_flow_table[i]->is_waiting_for_export) {
182182
send_export_request_to_ctt(m_flow_table[i]->m_flow.flow_hash_ctt);
183183
m_hashes_in_ctt[m_flow_table[i]->m_flow.flow_hash_ctt] -= 1;
184+
if (m_hashes_in_ctt[m_flow_table[i]->m_flow.flow_hash_ctt] < 0)
185+
{
186+
throw "bad ctt record";
187+
}
184188
if (m_hashes_in_ctt[m_flow_table[i]->m_flow.flow_hash_ctt] == 0) {
185189
m_hashes_in_ctt.erase(m_flow_table[i]->m_flow.flow_hash_ctt);
186190
}

0 commit comments

Comments
 (0)