first skiplist fix, courtesy of valgrind

This commit is contained in:
antirez 2009-10-23 22:16:50 +02:00
parent ace4ee541a
commit 913e9d6bca

View File

@ -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;
}