glx: Fix memory leak with software dri

dri_screen_init() now calls glx_screen_init() directly. Calling
twice overwrites the config.

Fixes: 7930fe5f01 ("glx: unify dri screen init")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35525>
(cherry picked from commit c3980bb4ec)
This commit is contained in:
Doug Nazar 2025-06-13 19:22:31 -04:00 committed by Eric Engestrom
parent 6d258a379e
commit 813fe7e59d
2 changed files with 2 additions and 8 deletions

View file

@ -6364,7 +6364,7 @@
"description": "glx: Fix memory leak with software dri",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "7930fe5f01790fe9777d5c94f55b703688c002c6",
"notes": null

View file

@ -656,17 +656,11 @@ driswCreateScreen(int screen, struct glx_display *priv, enum glx_driver glx_driv
if (psc == NULL)
return NULL;
psc->kopper = !strcmp(driver, "zink");
if (!glx_screen_init(&psc->base, screen, priv)) {
free(psc);
return NULL;
}
psc->base.driverName = strdup(driver);
if (glx_driver)
loader_extensions_local = kopper_extensions_noshm;
else if (!check_xshm(psc->base.dpy))
else if (!check_xshm(priv->dpy))
loader_extensions_local = loader_extensions_noshm;
else
loader_extensions_local = loader_extensions_shm;