aboutsummaryrefslogtreecommitdiff
path: root/example/ndpiReader.c
diff options
context:
space:
mode:
authorNardi Ivan <nardi.ivan@gmail.com>2020-06-23 19:32:33 +0200
committerNardi Ivan <nardi.ivan@gmail.com>2020-06-28 12:05:12 +0200
commitb24f5c4c0af2df8fd519e79cbcdf699a3b7c38bd (patch)
tree3bd5d9981e9d8ad4469c4aa5954e970aab254cfa /example/ndpiReader.c
parentd6a97219ea14f0eb4d7d0831d4aefc971878caae (diff)
Fix memory leak about purged/expired flows
Create an helper to avoid similar errors in the future Fixes: 1a62f4c7
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r--example/ndpiReader.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index d018c1672..2ded09888 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -1829,9 +1829,7 @@ static void node_idle_scan_walker(const void *node, ndpi_VISIT which, int depth,
if((flow->detected_protocol.app_protocol == NDPI_PROTOCOL_UNKNOWN) && !undetected_flows_deleted)
undetected_flows_deleted = 1;
- ndpi_free_flow_info_half(flow);
- ndpi_free_flow_data_analysis(flow);
- ndpi_free_flow_tls_data(flow);
+ ndpi_flow_info_free_data(flow);
ndpi_thread_info[thread_id].workflow->stats.ndpi_flow_count--;
/* adding to a queue (we can't delete it from the tree inline ) */