egl/x11: don't leak device_name when choosing zink

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36268>
(cherry picked from commit 3951125f98)
This commit is contained in:
Mike Blumenkrantz 2025-07-21 15:18:36 -04:00 committed by Eric Engestrom
parent 1cda588211
commit 28f746569c
2 changed files with 4 additions and 2 deletions

View file

@ -3714,7 +3714,7 @@
"description": "egl/x11: don't leak device_name when choosing zink",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -1781,8 +1781,10 @@ platform_x11_finalize(_EGLDisplay *disp)
if (!dri2_dpy->swrast) {
#ifdef HAVE_WAYLAND_PLATFORM
if (dri2_dpy->kopper)
if (dri2_dpy->kopper) {
free(dri2_dpy->device_name);
dri2_dpy->device_name = strdup("zink");
}
#endif
dri2_dpy->swap_available = true;