summaryrefslogtreecommitdiff
path: root/src/redis-benchmark.c
diff options
context:
space:
mode:
authorYang Bodong <bodong.ybd@alibaba-inc.com>2021-04-25 19:00:35 +0800
committerGitHub <noreply@github.com>2021-04-25 14:00:35 +0300
commit8423b77f14c0d3a58e580c65a70b4f980f5cdcf6 (patch)
tree0efb327098221b76873042c57d1dd8203444e592 /src/redis-benchmark.c
parent611959eee55a1fe0fa532a5f878ab5ba2b6b79c4 (diff)
downloadredis-8423b77f14c0d3a58e580c65a70b4f980f5cdcf6.tar.gz
When the password is wrong, redis-benchmark should exit (#8855)
Diffstat (limited to 'src/redis-benchmark.c')
-rw-r--r--src/redis-benchmark.c4
1 files changed, 3 insertions, 1 deletions
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);