From cab99f6427f5255b543592c429c899aeef866352 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Sat, 25 Sep 2010 15:26:34 +0200 Subject: [PATCH] Free command before returning --- hiredis.c | 1 + 1 file changed, 1 insertion(+) 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 {