From: Thomas Henn Date: Wed, 26 Nov 2008 16:51:29 +0000 (-0700) Subject: windows: fix visual object memleak X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=55aeeef5476528907f12ba42d6157dc1b016cadf;p=mesa.git windows: fix visual object memleak --- 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);