static fr_test_point_proto_decode_t *tp = NULL;
static dl_t *dl = NULL;
static dl_loader_t *dl_loader;
+static fr_dict_protocol_t *dl_proto;
static fr_dict_t *dict = NULL;
static void exitHandler(void)
{
+ if (dl_proto && dl_proto->free) dl_proto->free();
+
fr_dict_free(&dict, __FILE__);
if (dl && dl->handle) {
fr_exit_now(EXIT_FAILURE);
}
+ snprintf(buffer, sizeof(buffer), "libfreeradius_%s_dict_protocol", proto);
+
+ dl_proto = dlsym(dl->handle, buffer);
+ if (dl_proto && dl_proto->init() && (dl_proto->init() < 0)) {
+ fr_perror("fuzzer: Failed initializing library %s", buffer);
+ fr_exit_now(EXIT_FAILURE);
+ }
+
snprintf(buffer, sizeof(buffer), "%s_tp_decode_proto", proto);
tp = dlsym(dl->handle, buffer);