aboutsummaryrefslogtreecommitdiffstats
path: root/src/message.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-10-14 18:46:50 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-10-14 18:46:50 +0400
commit9ebf3a1a948f328543101ff1d2ab0f7521de8963 (patch)
treea944ec5e2951314c7fda39ba2628a7fff63ce165 /src/message.c
parentd16336b4929ac76a1661b9c7dafd28568e6e0859 (diff)
downloadrspamd-9ebf3a1a948f328543101ff1d2ab0f7521de8963.tar.gz
rspamd-9ebf3a1a948f328543101ff1d2ab0f7521de8963.zip
* Fix getting of message headers from lua plugins
* Fix forged recipients plugin
Diffstat (limited to 'src/message.c')
-rw-r--r--src/message.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/message.c b/src/message.c
index 4bfaf093a..5cdd24768 100644
--- a/src/message.c
+++ b/src/message.c
@@ -1177,13 +1177,14 @@ message_get_header (memory_pool_t * pool, GMimeMessage * message, const char *fi
break;
case FUNC_IA:
ia_list = (*(fieldfunc[i].rcptfunc)) (message, field);
- gret = g_list_alloc ();
ia = ia_list;
#ifndef GMIME24
while (ia && ia->address) {
ia_string = internet_address_to_string ((InternetAddress *) ia->address, FALSE);
- memory_pool_add_destructor (pool, (pool_destruct_func) g_free, ia_string);
+ if (pool != NULL) {
+ memory_pool_add_destructor (pool, (pool_destruct_func) g_free, ia_string);
+ }
gret = g_list_prepend (gret, ia_string);
ia = ia->next;
}
@@ -1191,7 +1192,9 @@ message_get_header (memory_pool_t * pool, GMimeMessage * message, const char *fi
i = internet_address_list_length (ia);
while (i > 0) {
ia_string = internet_address_to_string (internet_address_list_get_address (ia, i), FALSE);
- memory_pool_add_destructor (pool, (pool_destruct_func) g_free, ia_string);
+ if (pool != NULL) {
+ memory_pool_add_destructor (pool, (pool_destruct_func) g_free, ia_string);
+ }
gret = g_list_prepend (gret, ia_string);
--i;
}