From 2a078adee47316974d813bb4234d956cb15fdbb0 Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Fri, 7 Oct 2016 14:13:38 -0600 Subject: layers: Fix access violation in LVT Was sending an out-of-scope memory reference to the display driver in unique_objects::AllocateMemory. Change-Id: I6b700445125acab040310682c96e7507d0fd91aa --- layers/unique_objects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'layers/unique_objects.cpp') diff --git a/layers/unique_objects.cpp b/layers/unique_objects.cpp index b23f774b..1a79d771 100644 --- a/layers/unique_objects.cpp +++ b/layers/unique_objects.cpp @@ -335,11 +335,11 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateMemory(VkDevice device, const VkMemoryAll const VkAllocationCallbacks *pAllocator, VkDeviceMemory *pMemory) { const VkMemoryAllocateInfo *input_allocate_info = pAllocateInfo; std::unique_ptr safe_allocate_info; + std::unique_ptr safe_dedicated_allocate_info; layer_data *device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); if ((pAllocateInfo != nullptr) && ContainsExtStruct(pAllocateInfo, VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV)) { - std::unique_ptr safe_dedicated_allocate_info; // Assuming there is only one extension struct of this type in the list for now safe_dedicated_allocate_info = std::unique_ptr(new safe_VkDedicatedAllocationMemoryAllocateInfoNV); -- cgit v1.2.3