diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2006-09-20 14:39:24 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2006-09-20 14:39:24 +0000 |
commit | 0c54e47c0e93f725b8bc028b0d4614011dbe3fef (patch) | |
tree | 30c9dfb3bfa008bbe9c3ef90062b1dbd7f2889e2 /src/mesa/drivers/x11 | |
parent | 83c3f9658d00e9ede22461b97484e629714a80f9 (diff) |
fix a memleak in DestroyContext()
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r-- | src/mesa/drivers/x11/fakeglx.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index bc779a94a9..eecd52aa32 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5.1 + * Version: 6.5.2 * * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * @@ -1388,7 +1388,7 @@ Fake_glXCreateContext( Display *dpy, XVisualInfo *visinfo, xmvis = create_glx_visual( dpy, visinfo ); if (!xmvis) { /* unusable visual */ - FREE(glxCtx); + _mesa_free(glxCtx); return NULL; } } @@ -1396,7 +1396,7 @@ Fake_glXCreateContext( Display *dpy, XVisualInfo *visinfo, glxCtx->xmesaContext = XMesaCreateContext(xmvis, shareCtx ? shareCtx->xmesaContext : NULL); if (!glxCtx->xmesaContext) { - FREE(glxCtx); + _mesa_free(glxCtx); return NULL; } @@ -1617,6 +1617,7 @@ Fake_glXDestroyContext( Display *dpy, GLXContext ctx ) MakeCurrent_PrevReadBuffer = 0; XMesaDestroyContext( glxCtx->xmesaContext ); XMesaGarbageCollect(); + _mesa_free(glxCtx); } @@ -2277,7 +2278,7 @@ Fake_glXCreateNewContext( Display *dpy, GLXFBConfig config, glxCtx->xmesaContext = XMesaCreateContext(xmvis, shareCtx ? shareCtx->xmesaContext : NULL); if (!glxCtx->xmesaContext) { - FREE(glxCtx); + _mesa_free(glxCtx); return NULL; } @@ -2500,7 +2501,7 @@ Fake_glXCreateContextWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, int re glxCtx->xmesaContext = XMesaCreateContext(xmvis, shareCtx ? shareCtx->xmesaContext : NULL); if (!glxCtx->xmesaContext) { - FREE(glxCtx); + _mesa_free(glxCtx); return NULL; } |