From 86e57953828906eb61b38c0d1ec13f1be13ef485 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 16 Jan 2016 21:17:00 +0000 Subject: [PATCH] Fix crash --- src/libstat/backends/redis_backend.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c index 2c36a1758..41d03240a 100644 --- a/src/libstat/backends/redis_backend.c +++ b/src/libstat/backends/redis_backend.c @@ -780,16 +780,14 @@ rspamd_redis_processed (redisAsyncContext *c, gpointer r, gpointer priv) if (reply->elements == task->tokens->len) { for (i = 0; i < reply->elements; i ++) { + tok = g_ptr_array_index (task->tokens, i); elt = reply->element[i]; if (G_LIKELY (elt->type == REDIS_REPLY_INTEGER)) { - tok = g_ptr_array_index (task->tokens, i); tok->values[rt->id] = elt->integer; found ++; } else if (elt->type == REDIS_REPLY_STRING) { - tok = g_ptr_array_index (task->tokens, i); - if (rt->stcf->clcf->flags & RSPAMD_FLAG_CLASSIFIER_INTEGER) { rspamd_strtoul (elt->str, elt->len, &val); -- 2.39.5