mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
util/hash_table: Use FREE() to be consistent with the CALLOC_STRUCT() call
CALLOC_STRUCT() calls the OS abstraction layer to do the allocation.
Call FREE() to free the corresponding objects so we keep things
consistent and have proper debug traces when memory-debugging
is enabled.
Fixes: 6649b840c3 ("mesa/util: add a hash table wrapper which support 64-bit keys")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26423>
This commit is contained in:
parent
165d27abfc
commit
977cc3157d
1 changed files with 2 additions and 2 deletions
|
|
@ -802,7 +802,7 @@ _mesa_hash_table_u64_delete_key(struct hash_entry *entry)
|
|||
struct hash_key_u64 *_key = (struct hash_key_u64 *)entry->key;
|
||||
|
||||
if (_key)
|
||||
free(_key);
|
||||
FREE(_key);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -905,6 +905,6 @@ _mesa_hash_table_u64_remove(struct hash_table_u64 *ht, uint64_t key)
|
|||
struct hash_key *_key = (struct hash_key *)entry->key;
|
||||
|
||||
_mesa_hash_table_remove(ht->table, entry);
|
||||
free(_key);
|
||||
FREE(_key);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue