aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-02-05 23:21:45 +0000
committerBrian Paul <[email protected]>2002-02-05 23:21:45 +0000
commitc4afba36c3d4b45105bbba3252a3bd7f501bee22 (patch)
treeb2d02afbbe3364184ab4a2b5ad1bd6bcddd525d6 /src
parent79c2f534916046fab91f53ebd37f705bd25f7dcb (diff)
fix evaluator data and matrix stack mem leaks (Robert Bergkvist)
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/context.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 7ccf4db4702..75e726e1314 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1,4 +1,4 @@
-/* $Id: context.c,v 1.153 2002/01/05 21:53:20 brianp Exp $ */
+/* $Id: context.c,v 1.154 2002/02/05 23:21:45 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -505,6 +505,7 @@ free_matrix_stack( struct matrix_stack *stack )
for (i = 0; i < stack->MaxDepth; i++) {
_math_matrix_dtr(&stack->Stack[i]);
}
+ FREE(stack->Stack);
stack->Stack = stack->Top = NULL;
}
@@ -1708,6 +1709,8 @@ _mesa_free_context_data( GLcontext *ctx )
FREE( ctx->EvalMap.Map1Texture3.Points );
if (ctx->EvalMap.Map1Texture4.Points)
FREE( ctx->EvalMap.Map1Texture4.Points );
+ for (i = 0; i < 16; i++)
+ FREE((ctx->EvalMap.Map1Attrib[i].Points));
if (ctx->EvalMap.Map2Vertex3.Points)
FREE( ctx->EvalMap.Map2Vertex3.Points );
@@ -1727,6 +1730,8 @@ _mesa_free_context_data( GLcontext *ctx )
FREE( ctx->EvalMap.Map2Texture3.Points );
if (ctx->EvalMap.Map2Texture4.Points)
FREE( ctx->EvalMap.Map2Texture4.Points );
+ for (i = 0; i < 16; i++)
+ FREE((ctx->EvalMap.Map2Attrib[i].Points));
_mesa_free_colortable_data( &ctx->ColorTable );
_mesa_free_colortable_data( &ctx->PostConvolutionColorTable );