diff options
author | Xuelian Bai <xuelian.bai@samsung.com> | 2023-08-03 14:36:49 +0800 |
---|---|---|
committer | Xuelian Bai <xuelian.bai@samsung.com> | 2024-01-16 10:24:46 +0800 |
commit | 59b00a56b500a7f29afad5e59bc31e799e811de5 (patch) | |
tree | f58ff5d6ac6dc26bdf6f48c93282d6175e7edb42 | |
parent | 9369265d2e745a4d3090efd0ac7959523089f46d (diff) | |
download | Vulkan-Loader-59b00a56b500a7f29afad5e59bc31e799e811de5.tar.gz Vulkan-Loader-59b00a56b500a7f29afad5e59bc31e799e811de5.tar.bz2 Vulkan-Loader-59b00a56b500a7f29afad5e59bc31e799e811de5.zip |
Fix crash on pixel phone
Change-Id: I89320faf4c1063b9404cfca1d528edef4cfa8fb3
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
-rw-r--r-- | loader/loader.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/loader/loader.c b/loader/loader.c index 06f50f7c..1a5f938e 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -714,7 +714,8 @@ VkResult loader_init_generic_list(const struct loader_instance *inst, struct loa } void loader_destroy_generic_list(const struct loader_instance *inst, struct loader_generic_list *list) { - loader_instance_heap_free(inst, list->list); + if (list->count !=0) + loader_instance_heap_free(inst, list->list); list->count = 0; list->capacity = 0; list->list = NULL; @@ -5566,6 +5567,7 @@ VKAPI_ATTR void VKAPI_CALL terminator_DestroyInstance(VkInstance instance, const icd_terms = next_icd_term; } + ptr_instance->icd_terms = NULL; loader_scanned_icd_clear(ptr_instance, &ptr_instance->icd_tramp_list); loader_destroy_generic_list(ptr_instance, (struct loader_generic_list *)&ptr_instance->ext_list); |