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>
This commit is contained in:
Emil Velikov 2016-11-24 20:30:44 +00:00 committed by Emil Velikov
parent a1cf494f77
commit 78707a15f2
1 changed files with 1 additions and 0 deletions

View File

@ -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: