From: Arran Cudbard-Bell Date: Sat, 21 Jun 2014 15:26:01 +0000 (+0200) Subject: Same fix for eap session and handler trees X-Git-Tag: release_3_0_4_rc2~229 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=freeradius.git;a=commitdiff_plain;h=d4f8763e4d1f41049a1779a5f0ea3626abbe6927 Same fix for eap session and handler trees --- diff --git a/src/modules/rlm_eap/rlm_eap.c b/src/modules/rlm_eap/rlm_eap.c index 831e01e..b3ff531 100644 --- a/src/modules/rlm_eap/rlm_eap.c +++ b/src/modules/rlm_eap/rlm_eap.c @@ -226,18 +226,20 @@ static int mod_instantiate(CONF_SECTION *cs, void *instance) * Lookup sessions in the tree. We don't free them in * the tree, as that's taken care of elsewhere... */ - inst->session_tree = rbtree_create(inst, eap_handler_cmp, NULL, 0); + inst->session_tree = rbtree_create(NULL, eap_handler_cmp, NULL, 0); if (!inst->session_tree) { ERROR("rlm_eap (%s): Cannot initialize tree", inst->xlat_name); return -1; } + fr_link_talloc_ctx_free(inst, inst->session_tree); if (fr_debug_flag) { - inst->handler_tree = rbtree_create(inst, eap_handler_ptr_cmp, NULL, 0); + inst->handler_tree = rbtree_create(NULL, eap_handler_ptr_cmp, NULL, 0); if (!inst->handler_tree) { ERROR("rlm_eap (%s): Cannot initialize tree", inst->xlat_name); return -1; } + fr_link_talloc_ctx_free(inst, inst->handler_tree); #ifdef HAVE_PTHREAD_H if (pthread_mutex_init(&(inst->handler_mutex), NULL) < 0) {