summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hiredis.c1
1 files changed, 1 insertions, 0 deletions
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 {