diff --git a/src/util-radix4-tree.c b/src/util-radix4-tree.c index 942023b81d..7c7a448d5b 100644 --- a/src/util-radix4-tree.c +++ b/src/util-radix4-tree.c @@ -365,8 +365,12 @@ bool SCRadix4CompareTrees( /*------------------------------------Unit_Tests------------------------------*/ #ifdef UNITTESTS +static void SCRadix4UtFree(void *ptr) +{ + SCFree(ptr); +} -static const SCRadix4Config ut_ip_radix4_config = { NULL, NULL }; +static const SCRadix4Config ut_ip_radix4_config = { SCRadix4UtFree, NULL }; #define GET_IPV4(str) \ SCLogDebug("setting up %s", (str)); \ diff --git a/src/util-radix6-tree.c b/src/util-radix6-tree.c index eddbd39d53..659315d857 100644 --- a/src/util-radix6-tree.c +++ b/src/util-radix6-tree.c @@ -424,8 +424,12 @@ bool SCRadix6CompareTrees( /*------------------------------------Unit_Tests------------------------------*/ #ifdef UNITTESTS +static void SCRadix6UtFree(void *ptr) +{ + SCFree(ptr); +} -static const SCRadix6Config ut_ip_radix6_config = { NULL, NULL }; +static const SCRadix6Config ut_ip_radix6_config = { SCRadix6UtFree, NULL }; #define GET_IPV6(str) \ SCLogDebug("setting up %s", (str)); \