Check args before run ckquorum. Fix issue #2635

This commit is contained in:
Rogerio Goncalves 2015-07-24 14:08:50 +02:00
parent 64fcd0e6ff
commit ef29748d0d

View File

@ -3041,6 +3041,7 @@ void sentinelCommand(redisClient *c) {
sentinelRedisInstance *ri; sentinelRedisInstance *ri;
int usable; int usable;
if (c->argc != 3) goto numargserr;
if ((ri = sentinelGetMasterByNameOrReplyError(c,c->argv[2])) if ((ri = sentinelGetMasterByNameOrReplyError(c,c->argv[2]))
== NULL) return; == NULL) return;
int result = sentinelIsQuorumReachable(ri,&usable); int result = sentinelIsQuorumReachable(ri,&usable);