fix memory leak on 32-bit builds

This commit is contained in:
Pieter Noordhuis 2010-05-20 19:43:28 +02:00
parent 834c72fa57
commit 10dea8dc1b
1 changed files with 1 additions and 1 deletions

View File

@ -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 {