free context structure (bug 1252316) and s/free/_mesa_free/
authorBrian Paul <brian.paul@tungstengraphics.com>
Tue, 9 Aug 2005 14:23:28 +0000 (14:23 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Tue, 9 Aug 2005 14:23:28 +0000 (14:23 +0000)
src/mesa/drivers/windows/gdi/wmesa.c

index d32822e65dec8ed8a92e710447344c113d209049..00cd37550d05f2c162ff451af766fde86803c5d8 100644 (file)
@@ -1004,7 +1004,7 @@ WMesaContext WMesaCreateContext(HWND hWnd,
                                       1);
     
     if (!c->gl_visual) {
-       free(c);
+       _mesa_free(c);
        return NULL;
     }
 
@@ -1028,7 +1028,7 @@ WMesaContext WMesaCreateContext(HWND hWnd,
                                     &functions, (void *)c);
     if (!c->gl_ctx) {
        _mesa_destroy_visual( c->gl_visual );
-       free(c);
+       _mesa_free(c);
        return NULL;
     }
     
@@ -1042,7 +1042,7 @@ WMesaContext WMesaCreateContext(HWND hWnd,
     if (!c->gl_buffer) {
        _mesa_destroy_visual(c->gl_visual);
        _mesa_free_context_data(c->gl_ctx);
-       free(c);
+       _mesa_free(c);
        return NULL;
     }
     
@@ -1052,7 +1052,7 @@ WMesaContext WMesaCreateContext(HWND hWnd,
        _mesa_destroy_visual(c->gl_visual);
        _mesa_destroy_framebuffer(c->gl_buffer);
        _mesa_free_context_data(c->gl_ctx);
-       free(c);
+       _mesa_free(c);
        return NULL;
     }
 
@@ -1116,7 +1116,7 @@ WMesaContext WMesaCreateContext(HWND hWnd,
        _mesa_destroy_visual(c->gl_visual);
        _mesa_destroy_framebuffer(c->gl_buffer);
        _mesa_free_context_data(c->gl_ctx);
-       free(c);
+       _mesa_free(c);
        return NULL;
     }
     
@@ -1148,7 +1148,8 @@ void WMesaDestroyContext( void )
     _mesa_destroy_visual(c->gl_visual);
     _mesa_destroy_framebuffer(c->gl_buffer);
     _mesa_free_context_data(c->gl_ctx);
-    free(c);
+    _mesa_free(c->gl_ctx);
+    _mesa_free(c);
 }