]> source.dussan.org Git - rspamd.git/commitdiff
Fix some race conditions
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 18 Nov 2015 17:07:40 +0000 (17:07 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 18 Nov 2015 17:07:40 +0000 (17:07 +0000)
src/libserver/cfg_utils.c
src/rspamd.c

index 23de0bef254a8703199ac7bc8edbd7507dd75f4d..ce704f8cf181f3d624ca56b9c6a8a7a1b53cfca9 100644 (file)
@@ -226,10 +226,10 @@ rspamd_config_free (struct rspamd_config *cfg)
 
        g_list_free (cfg->classifiers);
        g_list_free (cfg->metrics_list);
-       lua_close (cfg->lua_state);
        rspamd_symbols_cache_destroy (cfg->cache);
        REF_RELEASE (cfg->libs_ctx);
        rspamd_mempool_delete (cfg->cfg_pool);
+       lua_close (cfg->lua_state);
        g_slice_free1 (sizeof (*cfg), cfg);
 }
 
index a283abaa2c1b9ee96b3897ed9b8ba9ecc341db88..c24dcc08a0e8e1c90220d6172ce0a9e61a5f4938 100644 (file)
@@ -1089,8 +1089,6 @@ main (gint argc, gchar **argv, gchar **env)
        }
 
        msg_info_main ("terminating...");
-
-       rspamd_symbols_cache_destroy (rspamd_main->cfg->cache);
        rspamd_log_close (rspamd_main->logger);
        REF_RELEASE (rspamd_main->cfg);
        g_free (rspamd_main);