summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2010-09-25 15:26:34 +0200
committerPieter Noordhuis <pcnoordhuis@gmail.com>2010-09-25 15:26:34 +0200
commitcab99f6427f5255b543592c429c899aeef866352 (patch)
treebc3faaf15639d9f2206e307109f972219d7082d4
parentbc3ec0f35a5c616d9971c286fddbab75cfd35ed9 (diff)
downloadhiredict-cab99f6427f5255b543592c429c899aeef866352.tar.xz
Free command before returning
-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 {