Skip to content
Snippets Groups Projects
Commit 825cb768 authored by Marek Olšák's avatar Marek Olšák Committed by Emil Velikov
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>
(cherry picked from commit d4e7d8b7)
parent a9413991
No related merge requests found
...@@ -280,6 +280,12 @@ amdgpu_winsys_create(int fd, const struct pipe_screen_config *config, ...@@ -280,6 +280,12 @@ amdgpu_winsys_create(int fd, const struct pipe_screen_config *config,
if (ws) { if (ws) {
pipe_reference(NULL, &ws->reference); pipe_reference(NULL, &ws->reference);
simple_mtx_unlock(&dev_tab_mutex); 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; 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