diff options
author | Lenny Komow <lenny@lunarg.com> | 2020-10-01 20:03:25 +0300 |
---|---|---|
committer | Lenny Komow <lenny@lunarg.com> | 2020-10-01 20:04:31 +0300 |
commit | f780c9dfb0ce9e867411718519d9fb31f679f302 (patch) | |
tree | b2e469ab37535643ffad678bb9084426ecd99f4b | |
parent | 8fdc21e4078d47510be6cb0b05b05cd3a774f582 (diff) |
loader: Fix incorrect allocation error cleanupsdk-1.2.154.0
-rw-r--r-- | loader/trampoline.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/loader/trampoline.c b/loader/trampoline.c index ea1ee8780..e0530802a 100644 --- a/loader/trampoline.c +++ b/loader/trampoline.c @@ -538,7 +538,9 @@ out: if (NULL != ptr_instance) { if (res != VK_SUCCESS) { - loader.instances = ptr_instance->next; + if (loader.instances == ptr_instance) { + loader.instances = ptr_instance->next; + } if (NULL != ptr_instance->disp) { loader_instance_heap_free(ptr_instance, ptr_instance->disp); } |