summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/util/hash_table.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/hash_table.c b/src/util/hash_table.c
index 3247593c1f6..3ec65afd4bb 100644
--- a/src/util/hash_table.c
+++ b/src/util/hash_table.c
@@ -300,7 +300,8 @@ hash_table_insert(struct hash_table *ht, uint32_t hash,
* required to avoid memory leaks, perform a search
* before inserting.
*/
- if (entry->hash == hash &&
+ if (!entry_is_deleted(ht, entry) &&
+ entry->hash == hash &&
ht->key_equals_function(key, entry->key)) {
entry->key = key;
entry->data = data;