aboutsummaryrefslogtreecommitdiff
path: root/example/ndpiReader.c
diff options
context:
space:
mode:
authorLuca Deri <lucaderi@users.noreply.github.com>2020-04-15 08:35:28 +0200
committerGitHub <noreply@github.com>2020-04-15 08:35:28 +0200
commitd3b4b81d6fd9adc5bbe6c04e45d51989bacd4102 (patch)
tree2595f332953f42ed337db40f3268c435a4767da4 /example/ndpiReader.c
parentd665df64e297051cd5b48605974846fa7076d883 (diff)
parente84563f9710ca1996eb7428a22a058527e604431 (diff)
Merge pull request #867 from IvanNardi/memory-leaks
Memory leaks
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r--example/ndpiReader.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index bc9df4294..91eca9bd2 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -1117,7 +1117,8 @@ static void printFlow(u_int16_t id, struct ndpi_flow_info *flow, u_int16_t threa
flowGetBDMeanandVariance(flow);
}
- fprintf(csv_fp, "\n");
+ if(csv_fp)
+ fprintf(csv_fp, "\n");
return;
}
@@ -1752,6 +1753,7 @@ static void node_idle_scan_walker(const void *node, ndpi_VISIT which, int depth,
ndpi_free_flow_info_half(flow);
ndpi_free_flow_data_analysis(flow);
+ ndpi_free_flow_tls_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 ) */