radv: Fix freeing meta state if the device pipeline cache fails to allocate.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 21 Jan 2018 20:47:31 +0000 (21:47 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 21 Jan 2018 23:07:24 +0000 (00:07 +0100)
CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_device.c

index 152ae7e7ae66b820da74fe9acbfdad92540a55f4..b5ae103239278c628379e85596ba5fd3901a1e21 100644 (file)
@@ -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);