From 9c1cf39b70c7c9670d5c7acf9f5194ae3bd7e47a Mon Sep 17 00:00:00 2001 From: John Sully Date: Wed, 21 Apr 2021 01:18:38 +0000 Subject: [PATCH] _dictExpandIfNeeded is called too late to be useful Former-commit-id: 7f75ca5d3a9ed47465bceb22f5f74fd6f0760008 --- src/dict.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dict.cpp b/src/dict.cpp index 88ad116bb..41e1a05da 100644 --- a/src/dict.cpp +++ b/src/dict.cpp @@ -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 */ }