diff options
author | Nardi Ivan <nardi.ivan@gmail.com> | 2020-07-26 21:11:34 +0200 |
---|---|---|
committer | Nardi Ivan <nardi.ivan@gmail.com> | 2020-07-26 21:11:34 +0200 |
commit | 7d843f4d17d3f5040e0b39a3a265404e85e4e3c7 (patch) | |
tree | ca1d0e4f92f69aadfce73a382717f1abdf00eb0b /example/ndpiReader.c | |
parent | 95263fc32e75c198b21ceedfd15522d4aa5a761d (diff) |
Minor fixes
Fix a memory leak and an issue (re)-introduced in configure script
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r-- | example/ndpiReader.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 54d5abd4b..b0d1a9122 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -2529,11 +2529,12 @@ static void printFlowsStats() { ndpi_free_bin(¢roids[i]); ndpi_free(centroids); - - ndpi_free(bins); - ndpi_free(cluster_ids); } } + if(bins) + ndpi_free(bins); + if(cluster_ids) + ndpi_free(cluster_ids); #endif } |