]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix memory corruption on termination
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 15 Mar 2017 15:35:28 +0000 (15:35 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 15 Mar 2017 15:35:28 +0000 (15:35 +0000)
src/libserver/symbols_cache.c

index 5b532b97994a440f654d2b5dd88102540dd365ac..0deacea3d6ee86542e725bb3be121223fae6fb0e 100644 (file)
@@ -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