From 84d1cad3cd3d36684d83c0fc0193b220015182e0 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 15 Mar 2017 15:35:28 +0000 Subject: [PATCH] [Fix] Fix memory corruption on termination --- src/libserver/symbols_cache.c | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.39.5