glx/dri2: strdup driver name

this is freed by the caller

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
(cherry picked from commit 046728f47a)
This commit is contained in:
Mike Blumenkrantz 2024-08-01 11:54:08 -04:00 committed by Eric Engestrom
parent 9817d44c27
commit aa3304fedf
2 changed files with 2 additions and 2 deletions

View file

@ -624,7 +624,7 @@
"description": "glx/dri2: strdup driver name",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -989,7 +989,7 @@ dri2_get_driver_name(struct glx_screen *glx_screen)
{
struct dri2_screen *psc = (struct dri2_screen *)glx_screen;
return psc->driverName;
return strdup(psc->driverName);
}
static const struct glx_screen_vtable dri2_screen_vtable = {