*/
#ifdef USE_CONSTRUCTOR
static void test_init(void) __attribute__((constructor));
+static void test_free(void) __attribute__((destructor));
#else
static void test_init(void);
# define TEST_INIT test_init()
+# define TEST_FINI test_free()
#endif
#include <freeradius-devel/util/acutest.h>
if (request_global_init() < 0) goto error;
}
+static void test_free(void)
+{
+ request_global_free();
+}
+
static request_t *request_fake_alloc(void)
{
request_t *request;
#define USE_CONSTRUCTOR
#ifdef USE_CONSTRUCTOR
-static void test_init(void) __attribute((constructor));
+static void test_init(void) __attribute__((constructor));
+static void test_free(void) __attribute__((destructor));
#else
static void test_init(void);
-#define TEST_INIT test_init()
+# define TEST_INIT test_init()
+# define TEST_FINI test_free()
#endif
#include <freeradius-devel/util/acutest.h>
if (request_global_init() < 0) goto error;
}
+static void test_free(void)
+{
+ request_global_free();
+}
+
static request_t *request_fake_alloc(void)
{
request_t *request;