Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
d32f8641
Unverified
Commit
d32f8641
authored
Aug 05, 2021
by
yoav-steinberg
Committed by
GitHub
Aug 05, 2021
Browse files
fix dict access broken by #9228 (#9319)
parent
5e908a29
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/object.c
View file @
d32f8641
...
...
@@ -427,8 +427,8 @@ void dismissSetObject(robj *o, size_t size_hint) {
}
/* Dismiss hash table memory. */
dismissMemory
(
set
->
ht
[
0
].
table
,
set
->
ht
[
0
].
size
*
sizeof
(
dictEntry
*
));
dismissMemory
(
set
->
ht
[
1
].
table
,
set
->
ht
[
1
].
size
*
sizeof
(
dictEntry
*
));
dismissMemory(set->ht
_
table
[0], DICTHT_SIZE(set->ht_size_exp[0])
*sizeof(dictEntry*));
dismissMemory(set->ht
_
table
[1], DICTHT_SIZE(set->ht_size_exp[1])
*sizeof(dictEntry*));
} else if (o->encoding == OBJ_ENCODING_INTSET) {
dismissMemory(o->ptr, intsetBlobLen((intset*)o->ptr));
}
...
...
@@ -452,8 +452,8 @@ void dismissZsetObject(robj *o, size_t size_hint) {
/* Dismiss hash table memory. */
dict *d = zs->dict;
dismissMemory
(
d
->
ht
[
0
].
table
,
d
->
ht
[
0
].
size
*
sizeof
(
dictEntry
*
));
dismissMemory
(
d
->
ht
[
1
].
table
,
d
->
ht
[
1
].
size
*
sizeof
(
dictEntry
*
));
dismissMemory(d->ht
_
table
[0], DICTHT_SIZE(d->ht_size_exp[0])
*sizeof(dictEntry*));
dismissMemory(d->ht
_
table
[1], DICTHT_SIZE(d->ht_size_exp[1])
*sizeof(dictEntry*));
} else if (o->encoding == OBJ_ENCODING_ZIPLIST) {
dismissMemory(o->ptr, ziplistBlobLen((unsigned char*)o->ptr));
}
...
...
@@ -478,8 +478,8 @@ void dismissHashObject(robj *o, size_t size_hint) {
}
/* Dismiss hash table memory. */
dismissMemory
(
d
->
ht
[
0
].
table
,
d
->
ht
[
0
].
size
*
sizeof
(
dictEntry
*
));
dismissMemory
(
d
->
ht
[
1
].
table
,
d
->
ht
[
1
].
size
*
sizeof
(
dictEntry
*
));
dismissMemory(d->ht
_
table
[0], DICTHT_SIZE(d->ht_size_exp[0])
*sizeof(dictEntry*));
dismissMemory(d->ht
_
table
[1], DICTHT_SIZE(d->ht_size_exp[1])
*sizeof(dictEntry*));
} else if (o->encoding == OBJ_ENCODING_ZIPLIST) {
dismissMemory(o->ptr, ziplistBlobLen((unsigned char*)o->ptr));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment