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 a2c9d38a9f
commit f0652c37a5

View File

@ -2386,6 +2386,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);