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:
|
||||
while ((node = listFirst(keys)) != NULL) {
|
||||
robj *kobj = listNodeValue(node);
|
||||
decrRefCount(kobj);
|
||||
listDelNode(keys, node);
|
||||
}
|
||||
listSetFreeMethod(keys,decrRefCountVoid);
|
||||
listRelease(keys);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user