Don't parent the rlm_cache rbtree directly from inst
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 21 Jun 2014 15:21:44 +0000 (17:21 +0200)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 21 Jun 2014 15:22:00 +0000 (17:22 +0200)
src/modules/rlm_cache/rlm_cache.c

index f14b3f4..2bd82f4 100644 (file)
@@ -667,11 +667,13 @@ static int mod_instantiate(CONF_SECTION *conf, void *instance)
        /*
         *      The cache.
         */
-       inst->cache = rbtree_create(inst, cache_entry_cmp, cache_entry_free, 0);
+
+       inst->cache = rbtree_create(NULL, cache_entry_cmp, cache_entry_free, 0);
        if (!inst->cache) {
                ERROR("Failed to create cache");
                return -1;
        }
+       fr_link_talloc_ctx_free(inst, inst->cache);
 
        /*
         *      The heap of entries to expire.