From 1e12c90c66c6ea720fd87e2dca61e0d15a38ca3a Mon Sep 17 00:00:00 2001 From: Toni Date: Wed, 10 Feb 2021 15:24:11 +0100 Subject: Fixed memory leaks caused by conditional free'ing for some TLS connec… (#1132) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed memory leaks caused by conditional free'ing for some TLS connections. * Members of tls_quic struct should also free'd if the detected master protocol is IMAPS / POPS / SMTPS / etc. Signed-off-by: Toni Uhlig * Prevent reader_util.c from exit()'ing if maximum flow count reached. This confuses the fuzzer. * Improved fuzz/Makefile.am to use LDADD for ../example/libndpiReader.a instead of LDFLAGS. That way, fuzz_ndpi_reader re-links to ../example/libndpiReader.a if something changed there. Signed-off-by: Toni Uhlig --- example/reader_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'example/reader_util.c') diff --git a/example/reader_util.c b/example/reader_util.c index 86ddf6ad2..e2a691576 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -812,7 +812,7 @@ static struct ndpi_flow_info *get_ndpi_flow_info(struct ndpi_workflow * workflow LOG(NDPI_LOG_ERROR, "maximum flow count (%u) has been exceeded\n", workflow->prefs.max_ndpi_flows); - exit(-1); + return NULL; } else { struct ndpi_flow_info *newflow = (struct ndpi_flow_info*)ndpi_malloc(sizeof(struct ndpi_flow_info)); -- cgit v1.2.3