From 8423b77f14c0d3a58e580c65a70b4f980f5cdcf6 Mon Sep 17 00:00:00 2001 From: Yang Bodong Date: Sun, 25 Apr 2021 19:00:35 +0800 Subject: [PATCH] When the password is wrong, redis-benchmark should exit (#8855) --- src/redis-benchmark.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c index 351335862..068c094e1 100644 --- a/src/redis-benchmark.c +++ b/src/redis-benchmark.c @@ -1782,8 +1782,10 @@ int main(int argc, const char **argv) { } else { config.redis_config = getRedisConfig(config.hostip, config.hostport, config.hostsocket); - if (config.redis_config == NULL) + if (config.redis_config == NULL) { fprintf(stderr, "WARN: could not fetch server CONFIG\n"); + exit(1); + } } if (config.num_threads > 0) { pthread_mutex_init(&(config.liveclients_mutex), NULL);