summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/amd/vulkan/radv_device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 8c59344a3c8..79ef8ed55db 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -74,8 +74,10 @@ radv_physical_device_init(struct radv_physical_device *device,
}
device->ws->query_info(device->ws, &device->rad_info);
result = radv_init_wsi(device);
- if (result != VK_SUCCESS)
+ if (result != VK_SUCCESS) {
+ device->ws->destroy(device->ws);
goto fail;
+ }
fprintf(stderr, "WARNING: radv is not a conformant vulkan implementation, testing use only.\n");
device->name = device->rad_info.name;