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:
Mel Henning
2025-06-11 00:16:09 -04:00
committed by Marge Bot
parent 95148a5dfd
commit d764e1c062
+4 -2
View File
@@ -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