diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-12-14 20:02:14 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-12-14 20:02:14 +0300 |
commit | 1cf238549b8a2626f537f00b215e75eb19621570 (patch) | |
tree | 4391ccc6863654364eadf3048815f3edee4cc243 /src | |
parent | 9f300615e8fca8076266de1a220c74a226d09979 (diff) | |
download | rspamd-1cf238549b8a2626f537f00b215e75eb19621570.tar.gz rspamd-1cf238549b8a2626f537f00b215e75eb19621570.zip |
* Fix issue with list concat
Diffstat (limited to 'src')
-rw-r--r-- | src/spf.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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; |