diff options
author | Jason Ekstrand <[email protected]> | 2019-12-02 13:51:59 -0600 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2019-12-16 15:16:49 -0800 |
commit | 9925871a1a798e30d77e703d2550bed127a4bf97 (patch) | |
tree | 384cfe2ef84e0416c751b08c7b5794efaf59144e /src | |
parent | 325ef15f261f68f5d3cd76ab85a55131a4734530 (diff) |
anv: Don't leak when set_tiling fails
Fixes: a44744e01d73 "anv: Require a dedicated allocation for..."
Reviewed-by: Ivan Briano <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
(cherry picked from commit 0a36fafa95175efbad1a61b36706e535929afd2b)
Conflicts resolved by Dylan Baker
Conflicts:
src/intel/vulkan/anv_device.c
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/vulkan/anv_device.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index e9c96108582..90019f2b14a 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -3098,9 +3098,10 @@ VkResult anv_AllocateMemory( i915_tiling); if (ret) { anv_bo_cache_release(device, &device->bo_cache, mem->bo); - return vk_errorf(device->instance, NULL, - VK_ERROR_OUT_OF_DEVICE_MEMORY, - "failed to set BO tiling: %m"); + result = vk_errorf(device->instance, NULL, + VK_ERROR_OUT_OF_DEVICE_MEMORY, + "failed to set BO tiling: %m"); + goto fail; } } } |