1
0
mirror of https://github.com/fluencelabs/redis synced 2025-03-18 16:40:50 +00:00

Merge pull request from soloestoy/fix-getuser-null-pointer

ACL: fix null pointer in getuser
This commit is contained in:
Salvatore Sanfilippo 2019-01-25 11:27:21 +01:00 committed by GitHub
commit e545b30f97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -618,6 +618,11 @@ void aclCommand(client *c) {
}
} else if (!strcasecmp(sub,"getuser") && c->argc == 3) {
user *u = ACLGetUserByName(c->argv[2]->ptr,sdslen(c->argv[2]->ptr));
if (u == NULL) {
addReplyNull(c);
return;
}
addReplyMapLen(c,2);
/* Flags */