aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-12-14 20:02:14 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-12-14 20:02:14 +0300
commit1cf238549b8a2626f537f00b215e75eb19621570 (patch)
tree4391ccc6863654364eadf3048815f3edee4cc243 /src
parent9f300615e8fca8076266de1a220c74a226d09979 (diff)
downloadrspamd-1cf238549b8a2626f537f00b215e75eb19621570.tar.gz
rspamd-1cf238549b8a2626f537f00b215e75eb19621570.zip
* Fix issue with list concat
Diffstat (limited to 'src')
-rw-r--r--src/spf.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/spf.c b/src/spf.c
index 7cb5ffe93..662ae285b 100644
--- a/src/spf.c
+++ b/src/spf.c
@@ -285,8 +285,12 @@ spf_record_dns_callback (int result, char type, int count, int ttl, void *addres
/* Insert new list in place of include element */
last = g_list_last (cb->rec->addrs);
- elt->prev->next = cb->rec->addrs;
- elt->next->prev = last;
+ if (elt->prev) {
+ elt->prev->next = cb->rec->addrs;
+ }
+ if (elt->next) {
+ elt->next->prev = last;
+ }
cb->rec->addrs->prev = elt->prev;
last->next = elt->next;