mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 06:10:13 +01:00
vulkan/wsi: Unlock before return on error path.
Fix defect reported by Coverity Scan.
Missing unlock (LOCK)
missing_unlock: Returning without unlocking wsi->wait_mutex.
Fixes: 4885e63a6d ("vulkan/wsi: implement missing wsi_register_device_event")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13698>
This commit is contained in:
parent
3a95e25e84
commit
794a9cf3d6
1 changed files with 3 additions and 1 deletions
|
|
@ -2683,8 +2683,10 @@ wsi_register_device_event(VkDevice device,
|
|||
mtx_lock(&wsi->wait_mutex);
|
||||
if (!wsi->hotplug_thread) {
|
||||
if (pthread_create(&wsi->hotplug_thread, NULL, udev_event_listener_thread,
|
||||
wsi_device))
|
||||
wsi_device)) {
|
||||
mtx_unlock(&wsi->wait_mutex);
|
||||
return VK_ERROR_OUT_OF_HOST_MEMORY;
|
||||
}
|
||||
}
|
||||
mtx_unlock(&wsi->wait_mutex);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue