From 8131af3f779f55da45dc98786d6bdfa98f8520bd Mon Sep 17 00:00:00 2001 From: Mixie <97407744+Maxi741cv@users.noreply.github.com> Date: Sat, 14 Mar 2026 21:28:42 +0300 Subject: [PATCH] xlib: use XMesaDestroyVisual when destroying display visuals destroy_visuals_on_display() frees XMesaVisual objects directly, but XMesaVisual has a dedicated destructor. Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14947 Reviewed-by: Adam Jackson Part-of: --- src/gallium/frontends/glx/xlib/glx_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/frontends/glx/xlib/glx_api.c b/src/gallium/frontends/glx/xlib/glx_api.c index e1d98369d09..3b74a313cc6 100644 --- a/src/gallium/frontends/glx/xlib/glx_api.c +++ b/src/gallium/frontends/glx/xlib/glx_api.c @@ -602,7 +602,7 @@ destroy_visuals_on_display(Display *dpy) if (VisualTable[i]->display == dpy) { /* remove this visual */ int j; - free(VisualTable[i]); + XMesaDestroyVisual(VisualTable[i]); for (j = i; j < NumVisuals - 1; j++) VisualTable[j] = VisualTable[j + 1]; NumVisuals--;