]> source.dussan.org Git - rspamd.git/commitdiff
Fix double free for fuzzy nodes.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 24 Apr 2014 23:06:17 +0000 (16:06 -0700)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 24 Apr 2014 23:06:17 +0000 (16:06 -0700)
src/fuzzy_storage.c

index 297e64eceb0c5fd6deef6b04ed388a0a28cf0f8b..555e1d19649d8b342d69234542f65ee2dd69e9af 100644 (file)
@@ -166,9 +166,8 @@ expire_nodes (gpointer *to_expire, gint expired_num,
                                server_stat->fuzzy_hashes_expired ++;
                        }
                        server_stat->fuzzy_hashes --;
-                       g_hash_table_remove (static_hash, node->h.hash_pipe);
                        rspamd_bloom_del (bf, node->h.hash_pipe);
-                       g_slice_free1 (sizeof (struct rspamd_fuzzy_node), node);
+                       g_hash_table_remove (static_hash, node->h.hash_pipe);
                }
                else {
                        cur = (GList *)to_expire[i];