diff options
-rw-r--r-- | configure.seed | 4 | ||||
-rw-r--r-- | example/ndpiReader.c | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/configure.seed b/configure.seed index 1c520f9ab..b344064cd 100644 --- a/configure.seed +++ b/configure.seed @@ -9,8 +9,8 @@ AC_ARG_ENABLE(fuzztargets, AS_HELP_STRING([--enable-fuzztargets], [Enable fuzz t AM_CONDITIONAL([BUILD_FUZZTARGETS], [test "x$enable_fuzztargets" = "xyes"]) AS_IF([test "${with_sanitizer+set}" = set],[ - CFLAGS+="${CFLAGS} -g3 -O0 -Wno-unused-value -fsanitize=address -fsanitize=undefined -fno-sanitize=alignment -fsanitize=leak -fno-omit-frame-pointer" - LDFLAGS+="${LDFLAGS} -fsanitize=address -fsanitize=undefined -fno-sanitize=alignment -fsanitize=leak" + CFLAGS="${CFLAGS} -g3 -O0 -Wno-unused-value -fsanitize=address -fsanitize=undefined -fno-sanitize=alignment -fsanitize=leak -fno-omit-frame-pointer" + LDFLAGS="${LDFLAGS} -fsanitize=address -fsanitize=undefined -fno-sanitize=alignment -fsanitize=leak" ]) LT_INIT 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 } |