mirror of
https://github.com/fluencelabs/redis
synced 2025-03-17 16:10:50 +00:00
another leak fixed. Can't find more for now, but still a bug in ZSETs to fix
This commit is contained in:
parent
599379ddda
commit
ad807e6fa3
6
redis.c
6
redis.c
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user