zink: Return NULL on vkCreateInstance failure
Previously we were returning uninitialized data on the error path.
Fixes: 015eda4a41 ("zink: deduplicate VkDevice and VkInstance")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35471>
This commit is contained in:
@@ -269,9 +269,11 @@ zink_create_instance(struct zink_screen *screen, struct zink_instance_info *inst
|
||||
if (err != VK_SUCCESS) {
|
||||
if (!screen->driver_name_is_inferred)
|
||||
mesa_loge("ZINK: vkCreateInstance failed (%s)", vk_Result_to_str(err));
|
||||
}
|
||||
|
||||
return instance;
|
||||
return NULL;
|
||||
} else {
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user