Commit 5fa5153b authored by antirez's avatar antirez
Browse files

SCAN: simplify keys list cleanup using listSetFreeMethod().

parent 108c6e67
...@@ -398,11 +398,7 @@ void scanCommand(redisClient *c) { ...@@ -398,11 +398,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