From: Dave Airlie Date: Thu, 1 Dec 2016 00:44:45 +0000 (+0000) Subject: radv: handle fence allocation failing X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7ad1c24e2afab3aacd56af9ffb48e2538d3dd3ee;p=mesa.git radv: handle fence allocation failing Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 75b7af1fd07..c1438feb852 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -1131,7 +1131,10 @@ VkResult radv_CreateFence( fence->submitted = false; fence->signalled = !!(pCreateInfo->flags & VK_FENCE_CREATE_SIGNALED_BIT); fence->fence = device->ws->create_fence(); - + if (!fence->fence) { + vk_free2(&device->alloc, pAllocator, fence); + return VK_ERROR_OUT_OF_HOST_MEMORY; + } *pFence = radv_fence_to_handle(fence);