aboutsummaryrefslogtreecommitdiffstats
path: root/src/expressions.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-04-06 20:59:16 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-04-06 20:59:16 +0400
commit0d464875b6c84108c2bb4b0c12d8f39fc78dc840 (patch)
tree2a3544b80f4494db692046d80c60525f3f8e47e2 /src/expressions.c
parent9c7a93b3cc0c866cd449e568f1c2054661f92786 (diff)
downloadrspamd-0d464875b6c84108c2bb4b0c12d8f39fc78dc840.tar.gz
rspamd-0d464875b6c84108c2bb4b0c12d8f39fc78dc840.zip
* Fix addresses filling in compare_distance function
Diffstat (limited to 'src/expressions.c')
-rw-r--r--src/expressions.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/expressions.c b/src/expressions.c
index 2ba975b79..8dfdc17b3 100644
--- a/src/expressions.c
+++ b/src/expressions.c
@@ -1029,7 +1029,7 @@ rspamd_recipients_distance (struct worker_task *task, GList *args)
if (num < MIN_RCPT_TO_COMPARE) {
return FALSE;
}
- ar = memory_pool_alloc (task->task_pool, num * sizeof (struct addr_list));
+ ar = memory_pool_alloc0 (task->task_pool, num * sizeof (struct addr_list));
/* Fill array */
cur = task->rcpts;
@@ -1041,10 +1041,8 @@ rspamd_recipients_distance (struct worker_task *task, GList *args)
*c = '\0';
ar[i].addr = c + 1;
}
- else {
- ar[i].addr = NULL;
- }
cur = internet_address_list_next (cur);
+ i ++;
}
/* Cycle all elements in array */