From: Bas Nieuwenhuizen Date: Sat, 23 May 2020 00:36:03 +0000 (+0200) Subject: radv: Do not close fd -1 when NULL-winsys creation fails. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a51ab5f95624d1c29d9592aa2212f80dead8ecdf;p=mesa.git radv: Do not close fd -1 when NULL-winsys creation fails. Fixes: cd6ec2b1abb "radv: implement a dummy winsys for creating devices without AMDGPU" Reviewed-by: Samuel Pitoiset Part-of: --- diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index cf41a03b254..dee5563e824 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -443,7 +443,8 @@ fail_wsi: fail_alloc: vk_free(&instance->alloc, device); fail_fd: - close(fd); + if (fd != -1) + close(fd); if (master_fd != -1) close(master_fd); return result;