aboutsummaryrefslogtreecommitdiff
path: root/example/ndpiReader.c
diff options
context:
space:
mode:
authorLuca Deri <lucaderi@users.noreply.github.com>2020-07-28 19:38:12 +0200
committerGitHub <noreply@github.com>2020-07-28 19:38:12 +0200
commit02dc8d5febb8fa6502d1f54ee7e9a11784aaa70b (patch)
treeb1cba14e6ff3f9a3c4e43f12ee8d555147e9388d /example/ndpiReader.c
parent32bd3d7a599a6dfcfadf6ed4ad684f904e50719c (diff)
parent7d843f4d17d3f5040e0b39a3a265404e85e4e3c7 (diff)
Merge pull request #970 from IvanNardi/fix
Minor fixes
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r--example/ndpiReader.c7
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(&centroids[i]);
ndpi_free(centroids);
-
- ndpi_free(bins);
- ndpi_free(cluster_ids);
}
}
+ if(bins)
+ ndpi_free(bins);
+ if(cluster_ids)
+ ndpi_free(cluster_ids);
#endif
}