Commit 3ff1bb4b authored by antirez's avatar antirez
Browse files

Sentinel: check arity for SENTINEL MASTER command.

This fixes issue #1530.
parent 6c9359ad
...@@ -2384,6 +2384,7 @@ void sentinelCommand(redisClient *c) { ...@@ -2384,6 +2384,7 @@ void sentinelCommand(redisClient *c) {
/* SENTINEL MASTER <name> */ /* SENTINEL MASTER <name> */
sentinelRedisInstance *ri; sentinelRedisInstance *ri;
if (c->argc != 3) goto numargserr;
if ((ri = sentinelGetMasterByNameOrReplyError(c,c->argv[2])) if ((ri = sentinelGetMasterByNameOrReplyError(c,c->argv[2]))
== NULL) return; == NULL) return;
addReplySentinelRedisInstance(c,ri); addReplySentinelRedisInstance(c,ri);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment