From: Pieter Noordhuis Date: Thu, 20 May 2010 17:43:28 +0000 (+0200) Subject: fix memory leak on 32-bit builds X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/10dea8dc1b6515bb8af6723fed4c28594572cefb?hp=--cc fix memory leak on 32-bit builds --- 10dea8dc1b6515bb8af6723fed4c28594572cefb diff --git a/redis.c b/redis.c index f2fbbdd5..76682d82 100644 --- a/redis.c +++ b/redis.c @@ -2927,8 +2927,8 @@ static robj *createStringObjectFromLongLong(long long value) { incrRefCount(shared.integers[value]); o = shared.integers[value]; } else { - o = createObject(REDIS_STRING, NULL); if (value >= LONG_MIN && value <= LONG_MAX) { + o = createObject(REDIS_STRING, NULL); o->encoding = REDIS_ENCODING_INT; o->ptr = (void*)((long)value); } else {