X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/96ffb2fe97c3e77879e7a4f6f7457397a18bf233..c1ae36aea814e1bcb0f046a00b51ed46d7432c3b:/src/debug.c diff --git a/src/debug.c b/src/debug.c index ba183d72..76d18b21 100644 --- a/src/debug.c +++ b/src/debug.c @@ -119,16 +119,13 @@ void computeDatasetDigest(unsigned char *final) { } listTypeReleaseIterator(li); } else if (o->type == REDIS_SET) { - dict *set = o->ptr; - dictIterator *di = dictGetIterator(set); - dictEntry *de; - - while((de = dictNext(di)) != NULL) { - robj *eleobj = dictGetEntryKey(de); - - xorObjectDigest(digest,eleobj); + setTypeIterator *si = setTypeInitIterator(o); + robj *ele; + while((ele = setTypeNext(si)) != NULL) { + xorObjectDigest(digest,ele); + decrRefCount(ele); } - dictReleaseIterator(di); + setTypeReleaseIterator(si); } else if (o->type == REDIS_ZSET) { zset *zs = o->ptr; dictIterator *di = dictGetIterator(zs->dict);