Skip to content
Snippets Groups Projects
Commit d4e7d8b7 authored by Marek Olšák's avatar Marek Olšák
Browse files

winsys/amdgpu: fix a device handle leak in amdgpu_winsys_create


Cc: 18.2 18.3 <mesa-stable@lists.freedesktop.org>
Reviewed-by: default avatarBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
parent 82aa07f8
No related branches found
No related tags found
Loading
......@@ -280,6 +280,12 @@ amdgpu_winsys_create(int fd, const struct pipe_screen_config *config,
if (ws) {
pipe_reference(NULL, &ws->reference);
simple_mtx_unlock(&dev_tab_mutex);
/* Release the device handle, because we don't need it anymore.
* This function is returning an existing winsys instance, which
* has its own device handle.
*/
amdgpu_device_deinitialize(dev);
return &ws->base;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment