loader: Ignore empty override strings

If you somehow have MESA_LOADER_DRIVER_OVERRIDE= in your environment,
you certainly weren't trying to force load the driver named "".

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38165>
This commit is contained in:
Rob Clark 2025-10-30 07:44:14 -07:00 committed by Marge Bot
parent 7bc14977a8
commit 15924e941c

View file

@ -766,7 +766,7 @@ loader_get_driver_for_fd(int fd)
*/
if (__normal_user()) {
const char *override = os_get_option("MESA_LOADER_DRIVER_OVERRIDE");
if (override)
if (override && strlen(override))
return strdup(override);
}