summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKristof Ralovich <kristof.ralovich@gmail.com>2008-08-20 15:06:09 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-08-20 15:33:03 -0600
commitfb36a54a1c327efc6602ff104b097359f9823931 (patch)
tree991bd64eee813c8339011a98603e4e4bf036f96b /src
parent145f5f60f19574e06c536c102bec0cfd6320606d (diff)
fix mem leak (free psc->visuals)
Diffstat (limited to 'src')
-rw-r--r--src/glx/x11/glxext.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c
index 27985e7f40..5844c3f656 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) {