Fix memory leak in MVCC scan

Former-commit-id: 3acf80f8dd5ebc311670398745ef3400333a1fcb
This commit is contained in:
John Sully 2020-07-16 22:42:24 +00:00
parent 658ebaa454
commit 6ec308c30f

View File

@ -1062,6 +1062,8 @@ void scanGenericCommand(client *c, robj_roptr o, unsigned long cursor) {
listNode *next = ln->next;
if (filterKey((robj*)listNodeValue(ln), patCopy, patlen))
{
robj *kobj = (robj*)listNodeValue(ln);
decrRefCount(kobj);
listDelNode(keys, ln);
}
ln = next;