Commit a25fe0b2 authored by antirez's avatar antirez
Browse files

SCAN: simplify keys list cleanup using listSetFreeMethod().

parent 0471b908
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment