diff options
author | Xuelian Bai <xuelian.bai@samsung.com> | 2023-08-03 14:36:49 +0800 |
---|---|---|
committer | Xuelian Bai <xuelian.bai@samsung.com> | 2023-08-03 14:37:20 +0800 |
commit | 122c89fbc38109d2f1241d3a386f3fbb6708efc7 (patch) | |
tree | c415447b52f6306d2bfacc5724608a2507ad86c1 | |
parent | 84321b06ebd382b1c899ee0a34c5ca12ec76116c (diff) | |
download | Vulkan-Loader-122c89fbc38109d2f1241d3a386f3fbb6708efc7.tar.gz Vulkan-Loader-122c89fbc38109d2f1241d3a386f3fbb6708efc7.tar.bz2 Vulkan-Loader-122c89fbc38109d2f1241d3a386f3fbb6708efc7.zip |
Fix crash on pixel phoneaccepted/tizen/unified/riscv/20230919.031459accepted/tizen_unified_riscv
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 c14aace8..2566c950 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -644,7 +644,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; } @@ -5562,6 +5563,7 @@ VKAPI_ATTR void VKAPI_CALL terminator_DestroyInstance(VkInstance instance, const icd_terms = next_icd_term; } + ptr_instance->icd_terms = NULL; loader_delete_layer_list_and_properties(ptr_instance, &ptr_instance->instance_layer_list); loader_scanned_icd_clear(ptr_instance, &ptr_instance->icd_tramp_list); |