util/hash_table: do not leak u64 struct key
For non 64bit devices the key stored in hash_table_u64 is wrapped in
hash_key_u64 structure, which is never free.
This commit fixes this issue by just removing the user-defined
`delete_function` parameter in hash_table_u64_{destroy,clear} (which
nobody is using) and using instead a delete function to free this
structure.
Fixes: 608257cf82
("i965: Fix INTEL_DEBUG=bat")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10480>
This commit is contained in:
@@ -1462,6 +1462,6 @@ dxil_nir_create_bare_samplers(nir_shader *nir)
|
||||
bool progress = nir_shader_instructions_pass(nir, redirect_sampler_derefs,
|
||||
nir_metadata_block_index | nir_metadata_dominance | nir_metadata_loop_analysis, sampler_to_bare);
|
||||
|
||||
_mesa_hash_table_u64_destroy(sampler_to_bare, NULL);
|
||||
_mesa_hash_table_u64_destroy(sampler_to_bare);
|
||||
return progress;
|
||||
}
|
||||
|
Reference in New Issue
Block a user