The equivalent of the last patch for the hash table. I'm not aware of any issues this fixes.
Signed-off-by: Connor Abbott <cwabbo...@gmail.com> --- src/util/hash_table.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/hash_table.c b/src/util/hash_table.c index 3247593..466519f 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_present(ht, entry) && + entry->hash == hash && ht->key_equals_function(key, entry->key)) { entry->key = key; entry->data = data; -- 2.4.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev