diff options
author | Ido Barnea <ibarnea@cisco.com> | 2016-05-11 10:47:16 +0300 |
---|---|---|
committer | Ido Barnea <ibarnea@cisco.com> | 2016-05-18 19:23:23 +0300 |
commit | 03d70c4218be1932e4d69dc52bf24106f85dcafb (patch) | |
tree | 86402d59d7465cb6e98ee40a0a1ff82be7ff1485 /src/flow_stat.cpp | |
parent | cb13e66205717a8fcf69185ba350adab3438ffa0 (diff) |
unit tests + simulator work
Diffstat (limited to 'src/flow_stat.cpp')
-rw-r--r-- | src/flow_stat.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/flow_stat.cpp b/src/flow_stat.cpp index b2c3f487..e0a6f3ff 100644 --- a/src/flow_stat.cpp +++ b/src/flow_stat.cpp @@ -387,6 +387,10 @@ CFlowStatHwIdMap::CFlowStatHwIdMap() { m_map = NULL; } +CFlowStatHwIdMap::~CFlowStatHwIdMap() { + delete[] m_map; +} + void CFlowStatHwIdMap::create(uint16_t size) { m_map = new uint32_t[size]; assert (m_map != NULL); @@ -457,8 +461,7 @@ CFlowStatRuleMgr::CFlowStatRuleMgr() { } CFlowStatRuleMgr::~CFlowStatRuleMgr() { - if (m_parser) - delete m_parser; + delete m_parser; } void CFlowStatRuleMgr::create() { @@ -498,7 +501,7 @@ int CFlowStatRuleMgr::compile_stream(const TrexStream * stream, CFlowStatParser if (parser->parse(stream->m_pkt.binary, stream->m_pkt.len) != 0) { // if we could not parse the packet, but no stat count needed, it is probably OK. if (stream->m_rx_check.m_enabled) { - throw TrexFStatEx("Failed parsing given packet for flow stat. Probably bad packet format." + throw TrexFStatEx("Failed parsing given packet for flow stat. Please consult the manual for supported packet types for flow stat." , TrexException::T_FLOW_STAT_BAD_PKT_FORMAT); } else { return 0; |