summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKarl Schultz <[email protected]>2002-08-28 18:26:38 +0000
committerKarl Schultz <[email protected]>2002-08-28 18:26:38 +0000
commit53880a85b647e2964b7d46c96483b00197007263 (patch)
tree87aed3711dd88cdd17bdb554e855ea6da432a376 /src/mesa
parent41771982c4e85e5a37d8ddac6b83de46391af478 (diff)
Don't call _mesa_initialize_context because we are using
_mesa_create_context. This avoids calling initialize twice and fixes memory leaks. Add call to free the GL context because we are creating it with _mesa_create_context, fixing another leak.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/windows/wmesa.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/mesa/drivers/windows/wmesa.c b/src/mesa/drivers/windows/wmesa.c
index 134f6853690..040dbd16da8 100644
--- a/src/mesa/drivers/windows/wmesa.c
+++ b/src/mesa/drivers/windows/wmesa.c
@@ -1,4 +1,4 @@
-/* $Id: wmesa.c,v 1.33 2002/07/29 00:01:00 kschultz Exp $ */
+/* $Id: wmesa.c,v 1.34 2002/08/28 18:26:38 kschultz Exp $ */
/*
* Windows (Win32) device driver for Mesa 3.4
@@ -1340,16 +1340,6 @@ WMesaContext WMesaCreateContext( HWND hWnd, HPALETTE* Pal,
return NULL;
}
- if (!_mesa_initialize_context(c->gl_ctx,
- c->gl_visual,
- (GLcontext *) NULL,
- &imports)) {
- _mesa_destroy_visual( c->gl_visual );
- free(c);
- return NULL;
- }
-
-
_mesa_enable_sw_extensions(c->gl_ctx);
_mesa_enable_1_3_extensions(c->gl_ctx);
@@ -1401,6 +1391,7 @@ void WMesaDestroyContext( void )
_mesa_destroy_visual( c->gl_visual );
_mesa_destroy_framebuffer( c->gl_buffer );
_mesa_free_context_data( c->gl_ctx );
+ free( (void *) c->gl_ctx);
if (c->db_flag)
#ifdef DDRAW