summaryrefslogtreecommitdiffstats
path: root/src/flow_stat.cpp
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-06-22 10:58:17 +0300
committerIdo Barnea <ibarnea@cisco.com>2016-06-22 10:58:17 +0300
commit9f641b7c0b7d99cf868f563b83cb047ced8cb275 (patch)
treeeea59817295140affa7fe63e8cccf4b534a81d72 /src/flow_stat.cpp
parenta5d8474b3f5598561298efc6e696378f584011c9 (diff)
adding flow stat profiles to simulator tests
Diffstat (limited to 'src/flow_stat.cpp')
-rw-r--r--src/flow_stat.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/flow_stat.cpp b/src/flow_stat.cpp
index 366c3aa8..cb7a1bf9 100644
--- a/src/flow_stat.cpp
+++ b/src/flow_stat.cpp
@@ -472,6 +472,16 @@ CFlowStatRuleMgr::CFlowStatRuleMgr() {
CFlowStatRuleMgr::~CFlowStatRuleMgr() {
delete m_parser;
+#ifdef TREX_SIM
+ // In simulator, nobody handles the messages to RX, so need to free them to have clean valgrind run.
+ if (m_ring_to_rx) {
+ CGenNode *msg = NULL;
+ while (! m_ring_to_rx->isEmpty()) {
+ m_ring_to_rx->Dequeue(msg);
+ delete msg;
+ }
+ }
+#endif
}
void CFlowStatRuleMgr::create() {