summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2010-06-11 23:13:49 +0200
committerantirez <antirez@gmail.com>2010-06-11 23:13:49 +0200
commit4b5f030d4fa41156390b38d6db8842de78f19dba (patch)
treee9d4deb6ff73125e554e21f55d3a87f7f0150d47
parent4b98ed2dca9a92e9c7deefd73543b65fb6abf083 (diff)
integer memory leak fixed, thanks to Amit Bakshi for both reporting and providing a patch
-rw-r--r--hiredis.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hiredis.c b/hiredis.c
index 4e614ce..f1fe9bc 100644
--- a/hiredis.c
+++ b/hiredis.c
@@ -129,6 +129,7 @@ static redisReply *redisReadIntegerReply(int fd) {
if (buf == NULL) return redisIOError();
r->type = REDIS_REPLY_INTEGER;
r->integer = strtoll(buf,NULL,10);
+ sdsfree(buf);
return r;
}