summaryrefslogtreecommitdiff
path: root/src/object.c
diff options
context:
space:
mode:
authoryoav-steinberg <yoav@monfort.co.il>2021-08-05 09:02:30 +0300
committerGitHub <noreply@github.com>2021-08-05 09:02:30 +0300
commitd32f8641ed5cda76234f7405d2b65e167223a9f1 (patch)
tree35db01f4bc150e2368d9756272ae991d15b5a22e /src/object.c
parent5e908a290ccbe9c4a7bea9356faf3b837df62793 (diff)
downloadredis-d32f8641ed5cda76234f7405d2b65e167223a9f1.tar.gz
fix dict access broken by #9228 (#9319)
Diffstat (limited to 'src/object.c')
-rw-r--r--src/object.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/object.c b/src/object.c
index 8d79645d3..3d50b67e6 100644
--- a/src/object.c
+++ b/src/object.c
@@ -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));
}