From cd627d4e7892701cb480001986184913a3ece7f5 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Sat, 5 Jun 2010 11:16:50 +0200 Subject: [PATCH] fixed two leaks for the dual encoded lists --- redis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redis.c b/redis.c index d507adae..d358ba3a 100644 --- a/redis.c +++ b/redis.c @@ -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);