Skip to content

Commit

Permalink
remove extra size check
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-binbin committed Dec 10, 2023
1 parent bc941c9 commit 1d9fb6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dict.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ int _dictExpand(dict *d, unsigned long size, int* malloc_failed)
* it can accept keys. */
if (d->ht_table[0] == NULL || d->ht_used[0] == 0) {
if (d->type->rehashingCompleted) d->type->rehashingCompleted(d);
if (d->ht_table[0] && d->ht_used[0] == 0) zfree(d->ht_table[0]);
if (d->ht_table[0]) zfree(d->ht_table[0]);
d->ht_size_exp[0] = new_ht_size_exp;
d->ht_used[0] = new_ht_used;
d->ht_table[0] = new_ht_table;
Expand Down

0 comments on commit 1d9fb6b

Please sign in to comment.