diff options
author | Jason Ekstrand <[email protected]> | 2019-12-02 13:51:59 -0600 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-12-05 10:59:10 -0600 |
commit | 0a36fafa95175efbad1a61b36706e535929afd2b (patch) | |
tree | ee1ee376d73ea960da8d9f44131e010a9e324b7e /src/intel | |
parent | 46af0ecc1d1f060786a1c2dfede1f936b407fbf6 (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]>
Diffstat (limited to 'src/intel')
-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 be4d23356e3..728c65a5c1b 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -3264,9 +3264,10 @@ VkResult anv_AllocateMemory( i915_tiling); if (ret) { anv_device_release_bo(device, 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; } } } |