From: Vsevolod Stakhov Date: Wed, 15 Mar 2017 15:35:28 +0000 (+0000) Subject: [Fix] Fix memory corruption on termination X-Git-Tag: 1.5.3~23 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=84d1cad3cd3d36684d83c0fc0193b220015182e0;p=rspamd.git [Fix] Fix memory corruption on termination --- 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