aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver
diff options
context:
space:
mode:
Diffstat (limited to 'src/libserver')
-rw-r--r--src/libserver/cfg_utils.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c
index 016556912..d07939374 100644
--- a/src/libserver/cfg_utils.c
+++ b/src/libserver/cfg_utils.c
@@ -232,11 +232,6 @@ rspamd_config_free (struct rspamd_config *cfg)
g_list_free (cfg->classifiers);
g_list_free (cfg->workers);
rspamd_symbols_cache_destroy (cfg->cache);
-#ifdef WITH_HIREDIS
- if (cfg->redis_pool) {
- rspamd_redis_pool_destroy (cfg->redis_pool);
- }
-#endif
ucl_object_unref (cfg->rcl_obj);
ucl_object_unref (cfg->config_comments);
ucl_object_unref (cfg->doc_strings);
@@ -257,13 +252,21 @@ rspamd_config_free (struct rspamd_config *cfg)
rspamd_re_cache_unref (cfg->re_cache);
rspamd_upstreams_library_unref (cfg->ups_ctx);
- rspamd_mempool_delete (cfg->cfg_pool);
g_ptr_array_free (cfg->c_modules, TRUE);
if (cfg->lua_state && cfg->own_lua_state) {
lua_thread_pool_free (cfg->lua_thread_pool);
lua_close (cfg->lua_state);
}
+
+#ifdef WITH_HIREDIS
+ if (cfg->redis_pool) {
+ rspamd_redis_pool_destroy (cfg->redis_pool);
+ }
+#endif
+
+ rspamd_mempool_delete (cfg->cfg_pool);
+
REF_RELEASE (cfg->libs_ctx);
DL_FOREACH_SAFE (cfg->log_pipes, lp, ltmp) {