From 6c1b7600e42030160e3d6e28d63302a390e51a27 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 24 Nov 2016 20:30:44 +0000 Subject: radv: don't leak the fd if radv_physical_device_init() succeeds radv_amdgpu_winsys_create() does not take ownership of the fd, thus we end up leaking it as we return with VK_SUCCESS. Cc: Dave Airlie Cc: "13.0" Signed-off-by: Emil Velikov Reviewed-by: Bas Nieuwenhuizen (cherry picked from commit 78707a15f205f9c2f45dc43ccbb99eb43029dc78) --- src/amd/vulkan/radv_device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 94a2ef0..797ad8c 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -91,6 +91,7 @@ radv_physical_device_init(struct radv_physical_device *device, fprintf(stderr, "WARNING: radv is not a conformant vulkan implementation, testing use only.\n"); device->name = device->rad_info.name; + close(fd); return VK_SUCCESS; fail: -- cgit v1.1