From fb36a54a1c327efc6602ff104b097359f9823931 Mon Sep 17 00:00:00 2001 From: Kristof Ralovich Date: Wed, 20 Aug 2008 15:06:09 -0600 Subject: [PATCH] fix mem leak (free psc->visuals) --- src/glx/x11/glxext.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c index 27985e7f40b..5844c3f656e 100644 --- a/src/glx/x11/glxext.c +++ b/src/glx/x11/glxext.c @@ -156,12 +156,15 @@ static void FreeScreenConfigs(__GLXdisplayPrivate *priv) for (i = 0; i < screens; i++, psc++) { if (psc->configs) { _gl_context_modes_destroy( psc->configs ); - if(psc->effectiveGLXexts) + if (psc->effectiveGLXexts) Xfree(psc->effectiveGLXexts); - psc->configs = NULL; /* NOTE: just for paranoia */ } - Xfree((char*) psc->serverGLXexts); + if (psc->visuals) { + _gl_context_modes_destroy( psc->visuals ); + psc->visuals = NULL; /* NOTE: just for paranoia */ + } + Xfree((char*) psc->serverGLXexts); #ifdef GLX_DIRECT_RENDERING if (psc->driScreen) { -- 2.30.2