Mesa (staging/21.3): util/hash_table: Clear special 0/1 entries for u64 hash table too
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Nov 2 20:10:59 UTC 2021
Module: Mesa
Branch: staging/21.3
Commit: 871365ed1078b7e05f93b256099307ec5f3a9b13
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=871365ed1078b7e05f93b256099307ec5f3a9b13
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>
(cherry picked from commit ffd4157b1caa69345468bbbe914e2bb64a4ddbaa)
---
.pick_status.json | 2 +-
src/util/hash_table.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index cba767f7a50..0e0107f808e 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -13,7 +13,7 @@
"description": "util/hash_table: Clear special 0/1 entries for u64 hash table too",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "e532a47f76cc8d763e2534c61b27dce0f5bc86a0"
},
diff --git a/src/util/hash_table.c b/src/util/hash_table.c
index 1811ee7432f..9be605d4312 100644
--- a/src/util/hash_table.c
+++ b/src/util/hash_table.c
@@ -807,6 +807,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