summaryrefslogtreecommitdiff
path: root/src/acl.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2019-02-11 16:28:31 +0100
committerantirez <antirez@gmail.com>2019-02-11 16:28:31 +0100
commitdf346bca3938de04dbf9794edc2dbaee64d5fc68 (patch)
tree1be72aa36ea4d831f7ff20e4da3aff8524971e2b /src/acl.c
parent2ce96c0fa7ec8532dc78a7f0e7a18b1105fe8151 (diff)
downloadredis-df346bca3938de04dbf9794edc2dbaee64d5fc68.tar.gz
ACL: ACLFreeUserAndKillClients(): free user later.
Soon or later we may have code in freeClient() that may have to deal with ACLs. Imagine for instance the command proposed multiple times (not sure if this will ever be accepted but still...): ONCLOSE DEL mykey Accumulating commands to run when a client is disconnected. Now the function is compatible with such use cases. Related to #5829.
Diffstat (limited to 'src/acl.c')
-rw-r--r--src/acl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/acl.c b/src/acl.c
index 13e6ac49a..7dc23f1c5 100644
--- a/src/acl.c
+++ b/src/acl.c
@@ -224,7 +224,6 @@ void ACLFreeUser(user *u) {
* connections in order to kill all the pending ones that
* are authenticated with such user. */
void ACLFreeUserAndKillClients(user *u) {
- ACLFreeUser(u);
listIter li;
listNode *ln;
listRewind(server.clients,&li);
@@ -242,6 +241,7 @@ void ACLFreeUserAndKillClients(user *u) {
freeClientAsync(c);
}
}
+ ACLFreeUser(u);
}
/* Copy the user ACL rules from the source user 'src' to the destination