提交 cd627d4e 编写于 作者: P Pieter Noordhuis

fixed two leaks for the dual encoded lists

上级 ab193fe4
......@@ -4191,7 +4191,6 @@ static robj *rdbLoadObject(int type, FILE *fp) {
} else {
ele = tryObjectEncoding(ele);
listAddNodeTail(o->ptr,ele);
incrRefCount(ele);
}
}
} else if (type == REDIS_SET) {
......@@ -5128,6 +5127,7 @@ static void listTypeConvert(robj *subject, int enc) {
if (enc == REDIS_ENCODING_LIST) {
list *l = listCreate();
listSetFreeMethod(l,decrRefCount);
/* listTypeGet returns a robj with incremented refcount */
li = listTypeInitIterator(subject,0,REDIS_TAIL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册