Sentinel: check arity for SENTINEL MASTER command.

This fixes issue #1530.
This commit is contained in:
antirez 2014-01-31 10:13:36 +01:00
parent 6c9359add1
commit 3ff1bb4b2e

View File

@ -2384,6 +2384,7 @@ void sentinelCommand(redisClient *c) {
/* SENTINEL MASTER <name> */
sentinelRedisInstance *ri;
if (c->argc != 3) goto numargserr;
if ((ri = sentinelGetMasterByNameOrReplyError(c,c->argv[2]))
== NULL) return;
addReplySentinelRedisInstance(c,ri);