radv: don't leak the fd if radv_physical_device_init() succeeds
authorEmil Velikov <emil.velikov@collabora.com>
Thu, 24 Nov 2016 20:30:44 +0000 (20:30 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 28 Nov 2016 19:51:22 +0000 (19:51 +0000)
commit78707a15f205f9c2f45dc43ccbb99eb43029dc78
tree6b053694d366f42ad97a4a12641e71f82968b426
parenta1cf494f7740c2afb851ffc3248e2cfa54d74ead
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>
src/amd/vulkan/radv_device.c