diff options
| author | Mark Mueller <markm@lunarg.com> | 2016-07-11 15:03:44 -0600 |
|---|---|---|
| committer | Mark Mueller <markm@lunarg.com> | 2016-07-12 09:09:15 -0600 |
| commit | ac0445e063c290d0569a254856366d0371033b4f (patch) | |
| tree | 4935e05abfcfe579f853be3eac8064ccf49a4f0c | |
| parent | 0d4d92aa4d55c62bdd97922c409f154d89491d65 (diff) | |
| download | usermoji-ac0445e063c290d0569a254856366d0371033b4f.tar.xz | |
layers: Added return check for freeMemObjInfo call
In FreeMemory, the return value of freeMemObjInfo was
being ignored, which incorrectly allowed calls which
failed validation to still be passed to lower levels.
This change corrects that.
Change-Id: Iddbffad22f9502061441e961daef2e7fa26a5fcf
| -rw-r--r-- | layers/core_validation.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index cd804b81..e3ed21be 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -4760,11 +4760,13 @@ FreeMemory(VkDevice device, VkDeviceMemory mem, const VkAllocationCallbacks *pAl // undefined behavior. std::unique_lock<std::mutex> lock(global_lock); - freeMemObjInfo(my_data, device, mem, false); + bool skip_call = freeMemObjInfo(my_data, device, mem, false); print_mem_list(my_data); printCBList(my_data); lock.unlock(); - my_data->device_dispatch_table->FreeMemory(device, mem, pAllocator); + if (!skip_call) { + my_data->device_dispatch_table->FreeMemory(device, mem, pAllocator); + } } static bool validateMemRange(layer_data *my_data, VkDeviceMemory mem, VkDeviceSize offset, VkDeviceSize size) { |
