anv: Don't leak when set_tiling fails
Fixes: a44744e01d
"anv: Require a dedicated allocation for..."
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
parent
46af0ecc1d
commit
0a36fafa95
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue