mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-29 00:50:23 +01:00
zink: unlock instance mutex if creation fails
avoids a deadlock
Fixes: 015eda4a41 ("zink: deduplicate VkDevice and VkInstance")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35292>
This commit is contained in:
parent
f611fb4af9
commit
cb6dfc4169
1 changed files with 3 additions and 1 deletions
|
|
@ -3275,8 +3275,10 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev
|
|||
if (++instance_refcount == 1) {
|
||||
instance_info.loader_version = zink_get_loader_version(screen);
|
||||
instance = zink_create_instance(screen, &instance_info);
|
||||
if (!instance)
|
||||
if (!instance) {
|
||||
simple_mtx_unlock(&instance_lock);
|
||||
goto fail;
|
||||
}
|
||||
} else {
|
||||
assert(instance);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue