Commit fb90934c authored by antirez's avatar antirez
Browse files

fixed memory leak introduced with the previous commit. Many thanks to Pieter...

fixed memory leak introduced with the previous commit. Many thanks to Pieter Noordhuis for spotting it in no time
parent 207ca3ce
...@@ -135,7 +135,10 @@ void _addReplyObjectToList(redisClient *c, robj *o) { ...@@ -135,7 +135,10 @@ void _addReplyObjectToList(redisClient *c, robj *o) {
void _addReplySdsToList(redisClient *c, sds s) { void _addReplySdsToList(redisClient *c, sds s) {
robj *tail; robj *tail;
if (c->flags & REDIS_CLOSE_AFTER_REPLY) return; if (c->flags & REDIS_CLOSE_AFTER_REPLY) {
sdsfree(s);
return;
}
if (listLength(c->reply) == 0) { if (listLength(c->reply) == 0) {
listAddNodeTail(c->reply,createObject(REDIS_STRING,s)); listAddNodeTail(c->reply,createObject(REDIS_STRING,s));
......
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