mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-10 01:18:18 +02:00
v3dv: close display_fd on incompatible_driver path
Currently, display_fd gets leaked during vulkan loader driver
probing on platforms where there's no v3dv device, as nothing
closes this fd before returning with INCOMPATIBLE_DRIVER. As
the display_fd also holds MASTER, this in turn prevents the
actual driver from becoming master on the display node.
Close the fd before returning to prevent this.
Fixes: bb532a7a ("v3dv: Fix assertion failure for not-found primary_fd during enumeration.")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41058>
This commit is contained in:
parent
e13c270d89
commit
2263576f59
1 changed files with 4 additions and 2 deletions
|
|
@ -1670,9 +1670,11 @@ enumerate_devices(struct vk_instance *vk_instance)
|
|||
break;
|
||||
}
|
||||
|
||||
if (render_fd < 0)
|
||||
if (render_fd < 0) {
|
||||
if (display_fd != -1)
|
||||
close(display_fd);
|
||||
result = VK_ERROR_INCOMPATIBLE_DRIVER;
|
||||
else
|
||||
} else
|
||||
result = create_physical_device(instance, primary_fd, render_fd, display_fd);
|
||||
|
||||
drmFreeDevices(devices, max_devices);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue