diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-26 18:16:42 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-26 18:16:42 +0100 |
commit | 27a72f0afe0398cd20685a02d612d4dd043487a2 (patch) | |
tree | 66d5ea4fc924e4915676a09ed06415223bbc5492 /src/libserver/cfg_utils.c | |
parent | f3d197ff3d67e5435882dd4c79f4e56ef03c0f5d (diff) | |
download | rspamd-27a72f0afe0398cd20685a02d612d4dd043487a2.tar.gz rspamd-27a72f0afe0398cd20685a02d612d4dd043487a2.zip |
Revert "[Fix] Postpone lua state destruction to allow lua dtors to be used"
This reverts commit 5275cae7517be59e0b451dbfacf5e5887feff619.
Diffstat (limited to 'src/libserver/cfg_utils.c')
-rw-r--r-- | src/libserver/cfg_utils.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c index 4348f7940..525a72a74 100644 --- a/src/libserver/cfg_utils.c +++ b/src/libserver/cfg_utils.c @@ -296,6 +296,11 @@ rspamd_config_free (struct rspamd_config *cfg) rspamd_upstreams_library_unref (cfg->ups_ctx); 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); @@ -314,11 +319,6 @@ rspamd_config_free (struct rspamd_config *cfg) g_free (cfg->checksum); } - if (cfg->lua_state && cfg->own_lua_state) { - lua_thread_pool_free (cfg->lua_thread_pool); - lua_close (cfg->lua_state); - } - REF_RELEASE (cfg->libs_ctx); DL_FOREACH_SAFE (cfg->log_pipes, lp, ltmp) { |