commit bceef07: [Minor] Fix deinit order

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Sep 13 12:21:04 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-09-13 13:16:31 +0100
URL: https://github.com/rspamd/rspamd/commit/bceef07323959f7e1a6bf09248c1ee08d5923bd0 (HEAD -> master)

[Minor] Fix deinit order

---
 src/libserver/cfg_utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c
index 8344ecc72..1788be3b8 100644
--- a/src/libserver/cfg_utils.c
+++ b/src/libserver/cfg_utils.c
@@ -334,7 +334,6 @@ rspamd_config_free (struct rspamd_config *cfg)
 	g_hash_table_unref (cfg->trusted_keys);
 
 	rspamd_re_cache_unref (cfg->re_cache);
-	rspamd_upstreams_library_unref (cfg->ups_ctx);
 	g_ptr_array_free (cfg->c_modules, TRUE);
 
 	if (cfg->lua_state && cfg->own_lua_state) {
@@ -352,6 +351,7 @@ rspamd_config_free (struct rspamd_config *cfg)
 		rspamd_monitored_ctx_destroy (cfg->monitored_ctx);
 	}
 
+	rspamd_upstreams_library_unref (cfg->ups_ctx);
 	HASH_CLEAR (hh, cfg->actions);
 
 	rspamd_mempool_destructors_enforce (cfg->cfg_pool);


More information about the Commits mailing list