summaryrefslogtreecommitdiffstats
path: root/src/libserver/cfg_utils.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-13 16:53:49 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-13 16:53:49 +0100
commit7f9da78d17ce6f406e870e4f8f06326db91566e9 (patch)
tree3e551a15802317096c7f899e2f4b774ae5893c2b /src/libserver/cfg_utils.c
parentdf9ee0b1caf1f5617fbf90cf1e4ff155757b5866 (diff)
downloadrspamd-7f9da78d17ce6f406e870e4f8f06326db91566e9.tar.gz
rspamd-7f9da78d17ce6f406e870e4f8f06326db91566e9.zip
[Minor] One more try to fix the release order
Diffstat (limited to 'src/libserver/cfg_utils.c')
-rw-r--r--src/libserver/cfg_utils.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c
index 1788be3b8..98b47efdc 100644
--- a/src/libserver/cfg_utils.c
+++ b/src/libserver/cfg_utils.c
@@ -336,11 +336,6 @@ rspamd_config_free (struct rspamd_config *cfg)
rspamd_re_cache_unref (cfg->re_cache);
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);
@@ -351,6 +346,11 @@ rspamd_config_free (struct rspamd_config *cfg)
rspamd_monitored_ctx_destroy (cfg->monitored_ctx);
}
+ if (cfg->lua_state && cfg->own_lua_state) {
+ lua_thread_pool_free (cfg->lua_thread_pool);
+ lua_close (cfg->lua_state);
+ }
+
rspamd_upstreams_library_unref (cfg->ups_ctx);
HASH_CLEAR (hh, cfg->actions);