Mesa (main): util/hash_table: Clear special 0/1 entries for u64 hash table too
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Nov 2 18:35:23 UTC 2021
Module: Mesa
Branch: main
Commit: ffd4157b1caa69345468bbbe914e2bb64a4ddbaa
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ffd4157b1caa69345468bbbe914e2bb64a4ddbaa
Author: Jesse Natalie <jenatali at microsoft.com>
Date: Fri Oct 15 16:27:17 2021 -0700
util/hash_table: Clear special 0/1 entries for u64 hash table too
Fixes: e532a47f ("util/hash_table: do not leak u64 struct key")
Reviewed-by: Emma Anholt <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13390>
---
src/util/hash_table.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/util/hash_table.c b/src/util/hash_table.c
index c7c8acf31a1..b0e7506ab8e 100644
--- a/src/util/hash_table.c
+++ b/src/util/hash_table.c
@@ -812,6 +812,8 @@ _mesa_hash_table_u64_clear(struct hash_table_u64 *ht)
return;
_mesa_hash_table_clear(ht->table, _mesa_hash_table_u64_delete_key);
+ ht->freed_key_data = NULL;
+ ht->deleted_key_data = NULL;
}
void
More information about the mesa-commit
mailing list