mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-20 05:50:12 +01:00
Revert "xf86drm: cap number of reported devices by drmGetDevice(2)"
This reverts commit 8cb12a2528.
The commit fixed the OOB, yet it broke drmDevices2(0, NULL, 0) - aka we
did not return the total devices list.
Reviewed-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
parent
632f59fcbf
commit
06844b6eae
1 changed files with 3 additions and 4 deletions
|
|
@ -4263,13 +4263,12 @@ drm_public int drmGetDevices2(uint32_t flags, drmDevicePtr devices[],
|
|||
if (!local_devices[i])
|
||||
continue;
|
||||
|
||||
if ((devices != NULL) && (device_count < max_devices)) {
|
||||
if ((devices != NULL) && (device_count < max_devices))
|
||||
devices[device_count] = local_devices[i];
|
||||
device_count++;
|
||||
} else {
|
||||
else
|
||||
drmFreeDevice(&local_devices[i]);
|
||||
}
|
||||
|
||||
device_count++;
|
||||
}
|
||||
|
||||
closedir(sysdir);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue