Commit 913e9d6b authored by antirez's avatar antirez
Browse files

first skiplist fix, courtesy of valgrind

parent ace4ee54
...@@ -3744,7 +3744,7 @@ static void zslInsert(zskiplist *zsl, double score, robj *obj) { ...@@ -3744,7 +3744,7 @@ static void zslInsert(zskiplist *zsl, double score, robj *obj) {
x = zsl->header; x = zsl->header;
for (i = zsl->level-1; i >= 0; i--) { 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]; x = x->forward[i];
update[i] = x; update[i] = x;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment