diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-01-18 13:44:14 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-01-18 13:44:14 +0000 |
commit | 3a3a6f161bd5dd6c3452d103b7ac5e3b7a0932e6 (patch) | |
tree | 3c44dcb4f0fd0cd0eb351cec5de890122cd400a6 /src/fuzzy_storage.c | |
parent | 7d40df5184f0aa6facde77e088d0751d4c475c6a (diff) | |
download | rspamd-3a3a6f161bd5dd6c3452d103b7ac5e3b7a0932e6.tar.gz rspamd-3a3a6f161bd5dd6c3452d103b7ac5e3b7a0932e6.zip |
[Fix] Multiple memory corruption fixes
Diffstat (limited to 'src/fuzzy_storage.c')
-rw-r--r-- | src/fuzzy_storage.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index bfa3f3abf..9738c3f63 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -225,8 +225,6 @@ fuzzy_key_stat_dtor (gpointer p) if (st->last_ips) { rspamd_lru_hash_destroy (st->last_ips); } - - g_slice_free1 (sizeof (*st), st); } static void @@ -237,8 +235,6 @@ fuzzy_key_dtor (gpointer p) if (key->stat) { fuzzy_key_stat_dtor (key->stat); } - - g_slice_free1 (sizeof (*key), key); } static void @@ -2031,7 +2027,7 @@ init_fuzzy (struct rspamd_config *cfg) (rspamd_mempool_destruct_t)g_hash_table_unref, ctx->keys); ctx->master_flags = g_hash_table_new (g_direct_hash, g_direct_equal); rspamd_mempool_add_destructor (cfg->cfg_pool, - (rspamd_mempool_destruct_t)g_hash_table_unref, ctx->master_flags); + (rspamd_mempool_destruct_t)g_hash_table_unref, ctx->master_flags); ctx->errors_ips = rspamd_lru_hash_new_full (1024, (GDestroyNotify) rspamd_inet_address_destroy, g_free, rspamd_inet_address_hash, rspamd_inet_address_equal); @@ -2425,7 +2421,6 @@ start_fuzzy (struct rspamd_worker *worker) rspamd_keypair_cache_destroy (ctx->keypair_cache); } - g_hash_table_unref (ctx->keys); REF_RELEASE (ctx->cfg); exit (EXIT_SUCCESS); |