From 5916624286650de24d97330bed0cee7ac8c69b5c Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Fri, 15 Oct 2021 16:27:17 -0700 Subject: [PATCH] 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 Part-of: (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 508c2621a35..617f62ba083 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -238,7 +238,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