mirror of
https://github.com/fluencelabs/redis
synced 2025-04-23 01:22:13 +00:00
SCAN: simplify keys list cleanup using listSetFreeMethod().
This commit is contained in:
parent
0471b90844
commit
a25fe0b28d
6
src/db.c
6
src/db.c
@ -408,11 +408,7 @@ void scanCommand(redisClient *c) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
while ((node = listFirst(keys)) != NULL) {
|
listSetFreeMethod(keys,decrRefCountVoid);
|
||||||
robj *kobj = listNodeValue(node);
|
|
||||||
decrRefCount(kobj);
|
|
||||||
listDelNode(keys, node);
|
|
||||||
}
|
|
||||||
listRelease(keys);
|
listRelease(keys);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user