summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2016-11-24 20:30:44 +0000
committerEmil Velikov <emil.l.velikov@gmail.com>2016-12-14 19:03:09 +0000
commit6c1b7600e42030160e3d6e28d63302a390e51a27 (patch)
treee4c5a0f774a97391e13e0aa43fbc15eb80791027 /src/amd
parentdeba381a856581512c1c3fd2621b5a8a3b320252 (diff)
downloadexternal_mesa3d-6c1b7600e42030160e3d6e28d63302a390e51a27.zip
external_mesa3d-6c1b7600e42030160e3d6e28d63302a390e51a27.tar.gz
external_mesa3d-6c1b7600e42030160e3d6e28d63302a390e51a27.tar.bz2
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@redhat.com> Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> (cherry picked from commit 78707a15f205f9c2f45dc43ccbb99eb43029dc78)
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/vulkan/radv_device.c1
1 files changed, 1 insertions, 0 deletions
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: