Skip to content

Commit

Permalink
first skiplist fix, courtesy of valgrind
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Oct 23, 2009
1 parent ace4ee5 commit 913e9d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redis.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 913e9d6

Please sign in to comment.