aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/spf.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-29 11:53:58 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-29 11:53:58 +0000
commita7ac5f0119dbd9329449545693d71ff5d9835f94 (patch)
tree8a41bf470512a1b9c6c8d2d27e0418e694ed1b8f /src/libserver/spf.c
parent4ee4827ec25af72c0a8306764b9e41fc38e18fc3 (diff)
downloadrspamd-a7ac5f0119dbd9329449545693d71ff5d9835f94.tar.gz
rspamd-a7ac5f0119dbd9329449545693d71ff5d9835f94.zip
[Minor] Destroy old LRU cache to avoid reload leaks
Diffstat (limited to 'src/libserver/spf.c')
-rw-r--r--src/libserver/spf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libserver/spf.c b/src/libserver/spf.c
index 0d508ec15..5fac43aa1 100644
--- a/src/libserver/spf.c
+++ b/src/libserver/spf.c
@@ -198,6 +198,11 @@ spf_library_config (const ucl_object_t *obj)
}
}
+ if (spf_lib_ctx->spf_hash) {
+ rspamd_lru_hash_destroy (spf_lib_ctx->spf_hash);
+ spf_lib_ctx->spf_hash = NULL;
+ }
+
if ((value = ucl_object_find_key (obj, "spf_cache_size")) != NULL) {
if (ucl_object_toint_safe (value, &ival) && ival > 0) {
spf_lib_ctx->spf_hash = rspamd_lru_hash_new (