diff options
| author | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-07-06 09:04:55 -0600 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-07-07 17:57:48 -0600 |
| commit | e9157aacaf546a2c16f0dc5bf07be52d0e8d4a44 (patch) | |
| tree | e559a274f97b4372ab595e3df36afa6599abdd81 | |
| parent | e6b30f02bad07639f3429816499476d695dbd660 (diff) | |
| download | usermoji-e9157aacaf546a2c16f0dc5bf07be52d0e8d4a44.tar.xz | |
loader: Use stack allocation for temp storage
| -rw-r--r-- | loader/loader.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/loader/loader.c b/loader/loader.c index 71227f61..43e344b7 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -2021,7 +2021,7 @@ uint32_t loader_activate_instance_layers(struct loader_instance *inst) return 0; } - wrappedInstance = malloc(sizeof(VkBaseLayerObject) + wrappedInstance = loader_stack_alloc(sizeof(VkBaseLayerObject) * inst->activated_layer_list.count); if (!wrappedInstance) { loader_log(VK_DBG_REPORT_ERROR_BIT, 0, "Failed to malloc Instance objects for layer"); @@ -2076,7 +2076,6 @@ uint32_t loader_activate_instance_layers(struct loader_instance *inst) loader_init_instance_core_dispatch_table(inst->disp, nextGPA, (VkInstance) nextObj, (VkInstance) baseObj); - free(wrappedInstance); return inst->activated_layer_list.count; } |
