lima: fix leak of the screen hash table
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Erico Nunes <nunes.erico@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12902>
This commit is contained in:
parent
e7e762635d
commit
f8a37832df
|
@ -47,8 +47,14 @@ lima_drm_screen_destroy(struct pipe_screen *pscreen)
|
|||
|
||||
mtx_lock(&lima_screen_mutex);
|
||||
destroy = --screen->refcnt == 0;
|
||||
if (destroy)
|
||||
if (destroy) {
|
||||
_mesa_hash_table_remove_key(fd_tab, intptr_to_pointer(fd));
|
||||
|
||||
if (!fd_tab->entries) {
|
||||
_mesa_hash_table_destroy(fd_tab, NULL);
|
||||
fd_tab = NULL;
|
||||
}
|
||||
}
|
||||
mtx_unlock(&lima_screen_mutex);
|
||||
|
||||
if (destroy) {
|
||||
|
|
Loading…
Reference in New Issue