aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 516ff248..aeba8c8d 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -5379,6 +5379,7 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkAllocateMemory(VkDevice device,
VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL
vkFreeMemory(VkDevice device, VkDeviceMemory mem, const VkAllocationCallbacks *pAllocator) {
layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
+ loader_platform_thread_lock_mutex(&globalLock);
my_data->bufferRanges.erase(mem);
my_data->imageRanges.erase(mem);
@@ -5389,7 +5390,6 @@ vkFreeMemory(VkDevice device, VkDeviceMemory mem, const VkAllocationCallbacks *p
// buffers (on host or device) for anything other than destroying those objects will result in
// undefined behavior.
- loader_platform_thread_lock_mutex(&globalLock);
freeMemObjInfo(my_data, device, mem, VK_FALSE);
print_mem_list(my_data, device);
printCBList(my_data, device);