summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRogerio Goncalves <rogerlz@gmail.com>2015-07-24 14:08:50 +0200
committerRogerio Goncalves <rogerlz@gmail.com>2015-07-24 14:08:50 +0200
commitef29748d0d758c956f8adca70bc74902b0c2e20c (patch)
tree12c487e84e7db793560cf3d2f97c21d16188390c
parent64fcd0e6ff1f7a6b85f5432767a298a95eacfe00 (diff)
downloadredis-ef29748d0d758c956f8adca70bc74902b0c2e20c.tar.gz
Check args before run ckquorum. Fix issue #2635
-rw-r--r--src/sentinel.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sentinel.c b/src/sentinel.c
index 3ff8899d7..9ea2ef629 100644
--- a/src/sentinel.c
+++ b/src/sentinel.c
@@ -3041,6 +3041,7 @@ void sentinelCommand(redisClient *c) {
sentinelRedisInstance *ri;
int usable;
+ if (c->argc != 3) goto numargserr;
if ((ri = sentinelGetMasterByNameOrReplyError(c,c->argv[2]))
== NULL) return;
int result = sentinelIsQuorumReachable(ri,&usable);