Commit c685076a authored by Bas Nieuwenhuizen's avatar Bas Nieuwenhuizen

radv: Fix freeing meta state if the device pipeline cache fails to allocate.

CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
parent 71f0315a
......@@ -1196,13 +1196,15 @@ VkResult radv_CreateDevice(
result = radv_CreatePipelineCache(radv_device_to_handle(device),
&ci, NULL, &pc);
if (result != VK_SUCCESS)
goto fail;
goto fail_meta;
device->mem_cache = radv_pipeline_cache_from_handle(pc);
*pDevice = radv_device_to_handle(device);
return VK_SUCCESS;
fail_meta:
radv_device_finish_meta(device);
fail:
if (device->trace_bo)
device->ws->buffer_destroy(device->trace_bo);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment