mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 08:38:27 -05:00
fix memory leak on 32-bit builds
This commit is contained in:
parent
834c72fa57
commit
10dea8dc1b
2
redis.c
2
redis.c
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user