summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2019-12-02 13:51:59 -0600
committerDylan Baker <dylan@pnwbakers.com>2019-12-11 16:34:38 -0800
commit3f50741bc28f8ccd62b77aa1a940d3a26cba2b69 (patch)
tree34bcad823011f78f7d15dd6b5c7d7351822bb5e6
parent58395e529331ec00bb3bfa40f4dc9f2ef9902e20 (diff)
anv: Don't leak when set_tiling fails
Fixes: a44744e01d73 "anv: Require a dedicated allocation for..." Reviewed-by: Ivan Briano <ivan.briano@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (cherry picked from commit 0a36fafa95175efbad1a61b36706e535929afd2b) Conflicts resolved by Dylan Baker Conflicts: src/intel/vulkan/anv_device.c
-rw-r--r--src/intel/vulkan/anv_device.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 80e37838a50..9947a72e787 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -3267,9 +3267,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;
}
}
}