From: Alan T. DeKok Date: Fri, 25 Jul 2025 07:37:54 +0000 (+0200) Subject: actually free the cache X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f8783596e4c20a670685715592d3c848c446651;p=thirdparty%2Ffreeradius-server.git actually free the cache --- diff --git a/src/modules/rlm_dpsk/rlm_dpsk.c b/src/modules/rlm_dpsk/rlm_dpsk.c index fa3b276675..d84c7b09aa 100644 --- a/src/modules/rlm_dpsk/rlm_dpsk.c +++ b/src/modules/rlm_dpsk/rlm_dpsk.c @@ -993,17 +993,20 @@ static int mod_instantiate(CONF_SECTION *conf, void *instance) return 0; } -#ifdef HAVE_PTHREAD_H static int mod_detach(void *instance) { rlm_dpsk_t *inst = instance; if (!inst->cache_size) return 0; + rbtree_free(inst->cache); + +#ifdef HAVE_PTHREAD_H pthread_mutex_destroy(&inst->mutex); +#endif + return 0; } -#endif /* * The module name should be the only globally exported symbol. @@ -1023,9 +1026,7 @@ module_t rlm_dpsk = { .config = module_config, .bootstrap = mod_bootstrap, .instantiate = mod_instantiate, -#ifdef HAVE_PTHREAD_H .detach = mod_detach, -#endif .methods = { [MOD_AUTHORIZE] = mod_authorize, [MOD_AUTHENTICATE] = mod_authenticate,