diff options
author | imarom <imarom@cisco.com> | 2016-04-10 17:52:00 +0300 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-04-10 17:52:33 +0300 |
commit | 9c69e3dc328f78106348763fb47fcc847f39532d (patch) | |
tree | 425491eed15ce3df75bc4dfe6fa6b28693587e2a | |
parent | 4aab694dd856865fd4497cd8249bb68fcf9970dd (diff) |
memory error on simulation
-rwxr-xr-x | src/bp_sim.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bp_sim.cpp b/src/bp_sim.cpp index 2732548c..2c122e72 100755 --- a/src/bp_sim.cpp +++ b/src/bp_sim.cpp @@ -3652,10 +3652,15 @@ int CNodeGenerator::flush_file(dsec_t max_time, if ( unlikely( node_sl->is_mask_for_free() ) ) { thread->free_node(node); } else { - node_sl->handle(thread); + /* count before handle - node might be destroyed */ #ifdef TREX_SIM update_stl_stats(node_sl); + #endif + + node_sl->handle(thread); + + #ifdef TREX_SIM if (has_limit_reached()) { thread->m_stateless_dp_info.stop_traffic(node_sl->get_port_id(), false, 0); } |