Skip to content

Commit 2161a96

Browse files
committed
ZSETs random fixes. Now the implementation appears to be pretty stable
1 parent ad807e6 commit 2161a96

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

redis.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3869,7 +3869,10 @@ static void zaddCommand(redisClient *c) {
38693869
assert(deleted != 0);
38703870
zslInsert(zs->zsl,*score,c->argv[3]);
38713871
incrRefCount(c->argv[3]);
3872+
dictReplace(zs->dict,c->argv[3],score);
38723873
server.dirty++;
3874+
} else {
3875+
zfree(score);
38733876
}
38743877
addReply(c,shared.czero);
38753878
}

0 commit comments

Comments
 (0)