unittests: clean up memory for radix tests

pull/14025/head
Victor Julien 1 month ago committed by Victor Julien
parent a9b2707d62
commit f3c7877fb5

@ -365,8 +365,12 @@ bool SCRadix4CompareTrees(
/*------------------------------------Unit_Tests------------------------------*/ /*------------------------------------Unit_Tests------------------------------*/
#ifdef UNITTESTS #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) \ #define GET_IPV4(str) \
SCLogDebug("setting up %s", (str)); \ SCLogDebug("setting up %s", (str)); \

@ -424,8 +424,12 @@ bool SCRadix6CompareTrees(
/*------------------------------------Unit_Tests------------------------------*/ /*------------------------------------Unit_Tests------------------------------*/
#ifdef UNITTESTS #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) \ #define GET_IPV6(str) \
SCLogDebug("setting up %s", (str)); \ SCLogDebug("setting up %s", (str)); \

Loading…
Cancel
Save