Commit 10dea8dc authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

fix memory leak on 32-bit builds

parent 834c72fa
...@@ -2927,8 +2927,8 @@ static robj *createStringObjectFromLongLong(long long value) { ...@@ -2927,8 +2927,8 @@ static robj *createStringObjectFromLongLong(long long value) {
incrRefCount(shared.integers[value]); incrRefCount(shared.integers[value]);
o = shared.integers[value]; o = shared.integers[value];
} else { } else {
o = createObject(REDIS_STRING, NULL);
if (value >= LONG_MIN && value <= LONG_MAX) { if (value >= LONG_MIN && value <= LONG_MAX) {
o = createObject(REDIS_STRING, NULL);
o->encoding = REDIS_ENCODING_INT; o->encoding = REDIS_ENCODING_INT;
o->ptr = (void*)((long)value); o->ptr = (void*)((long)value);
} else { } else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment