From 913e9d6bcacfa28ace3b7ee1c75f8ec4e146974b Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 23 Oct 2009 22:16:50 +0200 Subject: [PATCH] first skiplist fix, courtesy of valgrind --- redis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redis.c b/redis.c index aba37d8d5..7158de60f 100644 --- a/redis.c +++ b/redis.c @@ -3744,7 +3744,7 @@ static void zslInsert(zskiplist *zsl, double score, robj *obj) { x = zsl->header; for (i = zsl->level-1; i >= 0; i--) { - while (x->forward[i]->score < score) + while (x->forward[i] && x->forward[i]->score < score) x = x->forward[i]; update[i] = x; }