_dictExpandIfNeeded is called too late to be useful

Former-commit-id: 7f75ca5d3a9ed47465bceb22f5f74fd6f0760008
This commit is contained in:
John Sully 2021-04-21 01:18:38 +00:00
parent da545be5b5
commit 9c1cf39b70

View File

@ -681,6 +681,7 @@ static dictEntry *dictGenericDelete(dict *d, const void *key, int nofree) {
}
}
d->ht[table].used--;
_dictExpandIfNeeded(d);
return he;
}
prevHe = he;
@ -689,7 +690,6 @@ static dictEntry *dictGenericDelete(dict *d, const void *key, int nofree) {
if (!dictIsRehashing(d)) break;
}
_dictExpandIfNeeded(d);
return NULL; /* not found */
}