1
0
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:
antirez 2013-10-25 11:58:03 +02:00
parent 0471b90844
commit a25fe0b28d

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