diff --git a/hiredis.c b/hiredis.c index c89d252..187cdd0 100644 --- a/hiredis.c +++ b/hiredis.c @@ -760,6 +760,7 @@ void *redisCommand(redisContext *c, const char *format, ...) { if (c->flags & REDIS_BLOCK) { if (redisCommandWriteBlock(c,&reply,cmd,sdslen(cmd)) == REDIS_OK) { + sdsfree(cmd); return reply; } } else {