summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas Henn <[email protected]>2008-11-26 09:51:29 -0700
committerBrian Paul <[email protected]>2008-11-26 09:51:29 -0700
commit55aeeef5476528907f12ba42d6157dc1b016cadf (patch)
treeb2c13fe7a61ed24cc8349f5799cbd1d8a80aff75 /src
parent279343059f8ec676afc1713f9d15030ba06f4a07 (diff)
windows: fix visual object memleak
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/windows/gdi/wmesa.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/windows/gdi/wmesa.c b/src/mesa/drivers/windows/gdi/wmesa.c
index 42432d6064f..80746950c71 100644
--- a/src/mesa/drivers/windows/gdi/wmesa.c
+++ b/src/mesa/drivers/windows/gdi/wmesa.c
@@ -1505,6 +1505,9 @@ WMesaContext WMesaCreateContext(HDC hDC,
ctx = &c->gl_ctx;
_mesa_initialize_context(ctx, visual, NULL, &functions, (void *)c);
+ /* visual no longer needed - it was copied by _mesa_initialize_context() */
+ _mesa_destroy_visual(visual);
+
_mesa_enable_sw_extensions(ctx);
_mesa_enable_1_3_extensions(ctx);
_mesa_enable_1_4_extensions(ctx);