*/
static bool init = false;
-static void *decode_ctx = NULL;
static fr_test_point_proto_decode_t *tp = NULL;
static dl_t *dl = NULL;
static dl_loader_t *dl_loader;
fr_exit_now(EXIT_FAILURE);
}
- if (tp->test_ctx && (tp->test_ctx(&decode_ctx, NULL) < 0)) {
- fr_perror("fuzzer: Failed initializing test point %s", buffer);
- fr_exit_now(EXIT_FAILURE);
- }
-
init = true;
return 1;
{
TALLOC_CTX * ctx = talloc_init_const("fuzzer");
fr_pair_list_t vps;
+ void *decode_ctx = NULL;
fr_pair_list_init(&vps);
if (!init) LLVMFuzzerInitialize(NULL, NULL);
+ if (tp->test_ctx && (tp->test_ctx(&decode_ctx, NULL) < 0)) {
+ fr_perror("fuzzer: Failed initializing test point decode_ctx");
+ fr_exit_now(EXIT_FAILURE);
+ }
+
tp->func(ctx, &vps, buf, len, decode_ctx);
+ talloc_free(decode_ctx);
talloc_free(ctx);
/*