diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-19 16:28:42 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-19 16:29:21 +0100 |
commit | 9bea98bce3ba8588ec41487e3cdc2bf6f28c6167 (patch) | |
tree | b251e5628c8091cae6bf8508cd77fdee9086b602 /src/plugins/fuzzy_check.c | |
parent | e3dc1d07f68861388895bd1f76b639189ec9cbb6 (diff) | |
download | rspamd-9bea98bce3ba8588ec41487e3cdc2bf6f28c6167.tar.gz rspamd-9bea98bce3ba8588ec41487e3cdc2bf6f28c6167.zip |
One more try to fix memset.
Diffstat (limited to 'src/plugins/fuzzy_check.c')
-rw-r--r-- | src/plugins/fuzzy_check.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 61966ccb9..498e1485e 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -497,10 +497,12 @@ fuzzy_check_module_config (struct rspamd_config *cfg) gint fuzzy_check_module_reconfig (struct rspamd_config *cfg) { - rspamd_mempool_delete (fuzzy_module_ctx->fuzzy_pool); + struct module_ctx saved_ctx; - memset (fuzzy_module_ctx + sizeof (fuzzy_module_ctx->ctx), - 0, sizeof (*fuzzy_module_ctx) - sizeof (fuzzy_module_ctx->ctx)); + saved_ctx = fuzzy_module_ctx->ctx; + rspamd_mempool_delete (fuzzy_module_ctx->fuzzy_pool); + memset (fuzzy_module_ctx, 0, sizeof (*fuzzy_module_ctx)); + fuzzy_module_ctx->ctx = saved_ctx; fuzzy_module_ctx->fuzzy_pool = rspamd_mempool_new ( rspamd_mempool_suggest_size ()); fuzzy_module_ctx->cfg = cfg; |