We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e161977 commit 127c15eCopy full SHA for 127c15e
src/rdb.c
@@ -981,13 +981,9 @@ robj *rdbLoadObject(int rdbtype, rio *rdb) {
981
rdbtype == REDIS_RDB_TYPE_ZSET_ZIPLIST ||
982
rdbtype == REDIS_RDB_TYPE_HASH_ZIPLIST)
983
{
984
- robj *aux = rdbLoadStringObject(rdb);
985
-
986
- if (aux == NULL) return NULL;
987
- o = createObject(REDIS_STRING,NULL); /* string is just placeholder */
988
- o->ptr = zmalloc(sdslen(aux->ptr));
989
- memcpy(o->ptr,aux->ptr,sdslen(aux->ptr));
990
- decrRefCount(aux);
+ o = rdbLoadStringObject(rdb);
+ if (o == NULL) return NULL;
+ o->ptr = sdsnative(o->ptr);
991
992
/* Fix the object encoding, and make sure to convert the encoded
993
* data type into the base type if accordingly to the current
0 commit comments