From: Vsevolod Stakhov Date: Mon, 22 Sep 2014 10:20:03 +0000 (+0100) Subject: Fix some more potential reload issues. X-Git-Tag: 0.7.1~24 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b3f9b35a520e348c655e184cbd429d03a12ca854;p=rspamd.git Fix some more potential reload issues. --- diff --git a/src/plugins/dkim_check.c b/src/plugins/dkim_check.c index 376d292f3..74168bcf0 100644 --- a/src/plugins/dkim_check.c +++ b/src/plugins/dkim_check.c @@ -240,6 +240,7 @@ dkim_module_reconfig (struct rspamd_config *cfg) if (dkim_module_ctx->dkim_domains) { g_hash_table_destroy (dkim_module_ctx->dkim_domains); } + memset (dkim_module_ctx, 0, sizeof (*dkim_module_ctx)); dkim_module_ctx->dkim_pool = rspamd_mempool_new ( rspamd_mempool_suggest_size ()); diff --git a/src/plugins/spf.c b/src/plugins/spf.c index 1e40ed3d9..106b5f019 100644 --- a/src/plugins/spf.c +++ b/src/plugins/spf.c @@ -168,6 +168,7 @@ spf_module_reconfig (struct rspamd_config *cfg) { rspamd_mempool_delete (spf_module_ctx->spf_pool); radix_tree_free (spf_module_ctx->whitelist_ip); + memset (spf_module_ctx, 0, sizeof (*spf_module_ctx)); spf_module_ctx->spf_pool = rspamd_mempool_new ( rspamd_mempool_suggest_size ());