提交 5b94b8ac 编写于 作者: A antirez

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
上级 25ef3192
......@@ -135,7 +135,10 @@ void _addReplyObjectToList(redisClient *c, robj *o) {
void _addReplySdsToList(redisClient *c, sds s) {
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) {
listAddNodeTail(c->reply,createObject(REDIS_STRING,s));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册