aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-03-15 15:35:28 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-03-15 15:35:28 +0000
commit84d1cad3cd3d36684d83c0fc0193b220015182e0 (patch)
treebd5baf9ebfd261d2cacd96409a4b6629f589657d /src
parente30a789108908e60c6268bb98c5fe398fa03149a (diff)
downloadrspamd-84d1cad3cd3d36684d83c0fc0193b220015182e0.tar.gz
rspamd-84d1cad3cd3d36684d83c0fc0193b220015182e0.zip
[Fix] Fix memory corruption on termination
Diffstat (limited to 'src')
-rw-r--r--src/libserver/symbols_cache.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libserver/symbols_cache.c b/src/libserver/symbols_cache.c
index 5b532b979..0deacea3d 100644
--- a/src/libserver/symbols_cache.c
+++ b/src/libserver/symbols_cache.c
@@ -2026,6 +2026,9 @@ rspamd_symbols_cache_start_refresh (struct symbols_cache * cache,
event_base_set (ev_base, &cbdata->resort_ev);
double_to_tv (tm, &tv);
event_add (&cbdata->resort_ev, &tv);
+ rspamd_mempool_add_destructor (cache->static_pool,
+ (rspamd_mempool_destruct_t)event_del,
+ &cbdata->resort_ev);
}
void