diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-02-03 18:14:59 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-02-03 18:14:59 +0000 |
commit | f17d9712daf64f865306dc19eb8600a14b72b9bd (patch) | |
tree | edd8dc403f5815913a93e3efd732997a91fe74b6 /src/plugins/regexp.c | |
parent | 640397d9209ca4367813bc418bffd5ba45c57a6d (diff) | |
download | rspamd-f17d9712daf64f865306dc19eb8600a14b72b9bd.tar.gz rspamd-f17d9712daf64f865306dc19eb8600a14b72b9bd.zip |
Fix some initializations.
Diffstat (limited to 'src/plugins/regexp.c')
-rw-r--r-- | src/plugins/regexp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c index 15eed1674..47cdc649f 100644 --- a/src/plugins/regexp.c +++ b/src/plugins/regexp.c @@ -1326,10 +1326,10 @@ static gboolean rspamd_check_smtp_data (struct rspamd_task *task, GList * args, void *unused) { struct expression_argument *arg; - InternetAddressList *ia; + InternetAddressList *ia = NULL; const gchar *type, *what = NULL; GList *cur; - gint i; + gint i, ialen; if (args == NULL) { msg_warn ("no parameters to function"); @@ -1416,7 +1416,8 @@ rspamd_check_smtp_data (struct rspamd_task *task, GList * args, void *unused) } else { if (ia != NULL) { - for (i = 0; i < internet_address_list_length(ia); i ++) { + ialen = internet_address_list_length(ia); + for (i = 0; i < ialen; i ++) { InternetAddress *iaelt = internet_address_list_get_address(ia, i); InternetAddressMailbox *iamb = @@ -1440,7 +1441,8 @@ rspamd_check_smtp_data (struct rspamd_task *task, GList * args, void *unused) } else { if (ia != NULL) { - for (i = 0; i < internet_address_list_length(ia); i ++) { + ialen = internet_address_list_length(ia); + for (i = 0; i < ialen; i ++) { InternetAddress *iaelt = internet_address_list_get_address(ia, i); InternetAddressMailbox *iamb = |