Mesa (master): radv: don't leak the fd if radv_physical_device_init() succeeds
Emil Velikov
evelikov at kemper.freedesktop.org
Mon Nov 28 20:15:40 UTC 2016
Module: Mesa
Branch: master
Commit: 78707a15f205f9c2f45dc43ccbb99eb43029dc78
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=78707a15f205f9c2f45dc43ccbb99eb43029dc78
Author: Emil Velikov <emil.velikov at collabora.com>
Date: Thu Nov 24 20:30:44 2016 +0000
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 <airlied at redhat.com>
Cc: "13.0" <mesa-stable at lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
---
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 f89fc9d..0dbb3f8 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -130,6 +130,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:
More information about the mesa-commit
mailing list