提交 ad807e6f 编写于 作者: A antirez

another leak fixed. Can't find more for now, but still a bug in ZSETs to fix

上级 599379dd
......@@ -3731,17 +3731,21 @@ static zskiplist *zslCreate(void) {
static void zslFreeNode(zskiplistNode *node) {
decrRefCount(node->obj);
zfree(node->forward);
zfree(node);
}
static void zslFree(zskiplist *zsl) {
zskiplistNode *node = zsl->header->forward[1], *next;
zskiplistNode *node = zsl->header->forward[0], *next;
zfree(zsl->header->forward);
zfree(zsl->header);
while(node) {
next = node->forward[0];
zslFreeNode(node);
node = next;
}
zfree(zsl);
}
static int zslRandomLevel(void) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册