From 91f1ab0bd1e329f6a648cfbe5a270b648f59a579 Mon Sep 17 00:00:00 2001 From: Lenny Komow Date: Wed, 11 Oct 2017 13:39:33 -0600 Subject: loader: Fix loader using stale VkApplicationInfo Fix a bug where the loader could crash because it used a VkApplicationInfo struct after the struct had gone out of scope. --- loader/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'loader/loader.c') diff --git a/loader/loader.c b/loader/loader.c index 62a17074..6acbd215 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -5137,9 +5137,9 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateInstance(const VkInstanceCreateI loader_destroy_generic_list(ptr_instance, (struct loader_generic_list *)&icd_exts); // Create an instance, substituting the version to 1.0 if necessary + VkApplicationInfo icd_app_info; uint32_t requested_version = pCreateInfo == NULL || pCreateInfo->pApplicationInfo == NULL ? VK_API_VERSION_1_0 : pCreateInfo->pApplicationInfo->apiVersion; if (requested_version > icd_term->scanned_icd->api_version) { - VkApplicationInfo icd_app_info; if (icd_create_info.pApplicationInfo == NULL) { memset(&icd_app_info, 0, sizeof(icd_app_info)); } else { -- cgit v1.2.3