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) { ...@@ -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);
} }
......
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