diff options
author | antirez <antirez@gmail.com> | 2020-05-09 11:13:32 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2020-05-09 11:13:32 +0200 |
commit | 1750513ac762ef1d2d488e3c7d79a1002a905508 (patch) | |
tree | cc7b4fd767557656a50afa1f43812a002a1652e8 | |
parent | 4387ba6a17887d23c1919619f517b521eacbb665 (diff) | |
parent | 5fa6f9ebe12c439b56c17ac49db1796516fe5319 (diff) | |
download | redis-1750513ac762ef1d2d488e3c7d79a1002a905508.tar.gz |
Merge branch 'unstable' of github.com:/antirez/redis into unstable
-rw-r--r-- | src/redis-benchmark.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c index 77daf981c..34295147d 100644 --- a/src/redis-benchmark.c +++ b/src/redis-benchmark.c @@ -279,7 +279,7 @@ static redisConfig *getRedisConfig(const char *ip, int port, for (; i < 2; i++) { int res = redisGetReply(c, &r); if (reply) freeReplyObject(reply); - reply = ((redisReply *) r); + reply = res == REDIS_OK ? ((redisReply *) r) : NULL; if (res != REDIS_OK || !r) goto fail; if (reply->type == REDIS_REPLY_ERROR) { fprintf(stderr, "ERROR: %s\n", reply->str); |