From: antirez Date: Fri, 23 Oct 2009 20:16:50 +0000 (+0200) Subject: first skiplist fix, courtesy of valgrind X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/913e9d6bcacfa28ace3b7ee1c75f8ec4e146974b first skiplist fix, courtesy of valgrind --- diff --git a/redis.c b/redis.c index aba37d8d..7158de60 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; }