summaryrefslogtreecommitdiff
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorJuan A. Suarez Romero <jasuarez@igalia.com>2021-04-27 12:08:50 +0200
committerJuan A. Suarez Romero <jasuarez@igalia.com>2021-04-29 12:58:23 +0200
commite532a47f76cc8d763e2534c61b27dce0f5bc86a0 (patch)
tree2b3e036abad06f9f461dfc07d1b432ac30878685 /src/gallium/winsys
parent33f9b06b0e91d8d22217106700210f3bfa723275 (diff)
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: 608257cf82f ("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>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_winsys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
index 7c3e99404f9..08ee7e7e5cf 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
@@ -636,7 +636,7 @@ static void radeon_winsys_destroy(struct radeon_winsys *rws)
_mesa_hash_table_destroy(ws->bo_names, NULL);
_mesa_hash_table_destroy(ws->bo_handles, NULL);
- _mesa_hash_table_u64_destroy(ws->bo_vas, NULL);
+ _mesa_hash_table_u64_destroy(ws->bo_vas);
mtx_destroy(&ws->bo_handles_mutex);
mtx_destroy(&ws->vm32.mutex);
mtx_destroy(&ws->vm64.mutex);