diff --git a/src/redis-cli.c b/src/redis-cli.c index 563c75300798e3af6879c7983b7c09215cf319bb..e19a555f4ba2415252b4ca0ee3f6fee0fdcf2329 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -488,9 +488,13 @@ static int cliSendCommand(int argc, char **argv, int repeat) { } } - if (cliReadReply(output_raw) != REDIS_OK) + if (cliReadReply(output_raw) != REDIS_OK) { + free(argvlen); return REDIS_ERR; + } } + + free(argvlen); return REDIS_OK; }