From 9d34378360ceaa3291227470faa87794f91419bc Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 21 Apr 2015 14:52:48 +0100 Subject: [PATCH] Use normal allocator for maps data. --- src/plugins/surbl.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c index 7a22001b5..2f9467c57 100644 --- a/src/plugins/surbl.c +++ b/src/plugins/surbl.c @@ -221,7 +221,7 @@ read_redirectors_list (rspamd_mempool_t * pool, struct rspamd_redirector_map_cb *cbdata; if (data->cur_data == NULL) { - cbdata = rspamd_mempool_alloc (pool, sizeof (*cbdata)); + cbdata = g_slice_alloc0 (sizeof (*cbdata)); cbdata->patterns = g_array_sized_new (FALSE, FALSE, sizeof (ac_trie_pat_t), 32); @@ -257,6 +257,7 @@ fin_redirectors_list (rspamd_mempool_t * pool, struct map_cb_data *data) g_hash_table_unref (cbdata->re_hash); g_array_free (cbdata->patterns, TRUE); acism_destroy (surbl_module_ctx->redirector_trie); + g_slice_free1 (sizeof (*cbdata), cbdata); } cbdata = data->cur_data; @@ -840,12 +841,8 @@ static void dns_callback (struct rdns_reply *reply, gpointer arg) { struct dns_param *param = (struct dns_param *)arg; - struct rspamd_task *task; struct rdns_reply_entry *elt; - task = param->task; - - debug_task ("in surbl request callback"); /* If we have result from DNS server, this url exists in SURBL, so increase score */ if (reply->code == RDNS_RC_NOERROR && reply->entries) { msg_info ("<%s> domain [%s] is in surbl %s", param->task->message_id, @@ -857,7 +854,7 @@ dns_callback (struct rdns_reply *reply, gpointer arg) } } else { - debug_task ("<%s> domain [%s] is not in surbl %s", + msg_debug ("<%s> domain [%s] is not in surbl %s", param->task->message_id, param->host_resolve, param->suffix->suffix); } -- 2.39.5