From: antirez Date: Mon, 26 Oct 2009 16:57:24 +0000 (+0100) Subject: ZSETs random fixes. Now the implementation appears to be pretty stable X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/2161a9652725971e2602901410b4a5df0307f57e ZSETs random fixes. Now the implementation appears to be pretty stable --- diff --git a/redis.c b/redis.c index ffa41697..6ec24301 100644 --- a/redis.c +++ b/redis.c @@ -3869,7 +3869,10 @@ static void zaddCommand(redisClient *c) { assert(deleted != 0); zslInsert(zs->zsl,*score,c->argv[3]); incrRefCount(c->argv[3]); + dictReplace(zs->dict,c->argv[3],score); server.dirty++; + } else { + zfree(score); } addReply(c,shared.czero); }