ACL: make ACLAppendUserForLoading() able to report bad argument.

This commit is contained in:
antirez
2019-02-04 13:00:38 +01:00
parent 21e84cdae2
commit b166c41edd
3 changed files with 14 additions and 5 deletions

View File

@ -792,7 +792,8 @@ void loadServerConfigFromString(char *config) {
goto loaderr;
}
} else if (!strcasecmp(argv[0],"user") && argc >= 2) {
if (ACLAppendUserForLoading(argv,argc) == C_ERR) {
int argc_err;
if (ACLAppendUserForLoading(argv,argc,&argc_err) == C_ERR) {
err = "Syntax error in user declaration";
goto loaderr;
}