summaryrefslogtreecommitdiff
path: root/src/acl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/acl.c')
-rw-r--r--src/acl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/acl.c b/src/acl.c
index 97c00d4f8..fa57e210c 100644
--- a/src/acl.c
+++ b/src/acl.c
@@ -1576,6 +1576,12 @@ void addACLLogEntry(client *c, int reason, int keypos, sds username) {
/* Add it to our list of entires. We'll have to trim the list
* to its maximum size. */
listAddNodeHead(ACLLog, le);
+ while(listLength(ACLLog) > server.acllog_max_len) {
+ listNode *ln = listLast(ACLLog);
+ ACLLogEntry *le = listNodeValue(ln);
+ ACLFreeLogEntry(le);
+ listDelNode(ACLLog,ln);
+ }
}
}