Commit e7aa0b4b authored by antirez's avatar antirez
Browse files

memory leak resolved in redisReadIntegerReply

parent 4b5f030d
......@@ -126,7 +126,10 @@ static redisReply *redisReadIntegerReply(int fd) {
redisReply *r = malloc(sizeof(*r));
if (r == NULL) redisOOM();
if (buf == NULL) return redisIOError();
if (buf == NULL) {
free(r);
return redisIOError();
}
r->type = REDIS_REPLY_INTEGER;
r->integer = strtoll(buf,NULL,10);
sdsfree(buf);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment