Commit 0de83bcc authored by zhaozhao.zz's avatar zhaozhao.zz
Browse files

ACL: fix memory leak when key patterns no match

parent 8fc00793
......@@ -570,9 +570,12 @@ int ACLCheckCommandPerm(client *c) {
break;
}
}
if (!match) return ACL_DENIED_KEY;
if (!match) {
getKeysFreeResult(keyidx);
return ACL_DENIED_KEY;
}
}
getKeysFreeResult(keyidx);
if (keyidx) getKeysFreeResult(keyidx);
}
/* If we survived all the above checks, the user can execute the
......
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