aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/spf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/spf.c')
-rw-r--r--src/plugins/spf.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/spf.c b/src/plugins/spf.c
index c444199ba..8e03334fb 100644
--- a/src/plugins/spf.c
+++ b/src/plugins/spf.c
@@ -172,10 +172,13 @@ spf_module_config (struct rspamd_config *cfg)
gint
spf_module_reconfig (struct rspamd_config *cfg)
{
+ struct module_ctx saved_ctx;
+
+ saved_ctx = spf_module_ctx->ctx;
rspamd_mempool_delete (spf_module_ctx->spf_pool);
radix_destroy_compressed (spf_module_ctx->whitelist_ip);
- memset (spf_module_ctx + sizeof (spf_module_ctx->ctx),
- 0, sizeof (*spf_module_ctx) - sizeof (spf_module_ctx->ctx));
+ memset (spf_module_ctx, 0, sizeof (*spf_module_ctx));
+ spf_module_ctx->ctx = saved_ctx;
spf_module_ctx->spf_pool = rspamd_mempool_new (
rspamd_mempool_suggest_size ());