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:
committed by
Marge Bot
parent
f611fb4af9
commit
cb6dfc4169
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user