Fix uninitialized variable in new errorstats commit (#8280)

This commit is contained in:
Oran Agra 2021-01-03 16:14:52 +02:00 committed by GitHub
parent 7896debe6c
commit 91690a2920
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -851,6 +851,8 @@ int RM_CreateCommand(RedisModuleCtx *ctx, const char *name, RedisModuleCmdFunc c
cp->rediscmd->keystep = keystep;
cp->rediscmd->microseconds = 0;
cp->rediscmd->calls = 0;
cp->rediscmd->rejected_calls = 0;
cp->rediscmd->failed_calls = 0;
dictAdd(server.commands,sdsdup(cmdname),cp->rediscmd);
dictAdd(server.orig_commands,sdsdup(cmdname),cp->rediscmd);
cp->rediscmd->id = ACLGetCommandID(cmdname); /* ID used for ACL. */