From 8aee2a3326a5a634df865c50b9f2331744a4c6fc Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 29 Aug 2000 18:57:58 +0000 Subject: [PATCH] don't free ctx inside _mesa_initialize_context() if error, caller does that. --- src/mesa/main/context.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 9933076..ce1cb44 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1,4 +1,4 @@ -/* $Id: context.c,v 1.80 2000/08/21 14:22:24 brianp Exp $ */ +/* $Id: context.c,v 1.81 2000/08/29 18:57:58 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -1376,7 +1376,8 @@ alloc_proxy_textures( GLcontext *ctx ) /* - * Initialize a GLcontext struct. + * Initialize a GLcontext struct. This includes allocating all the + * other structs and arrays which hang off of the context by pointers. */ GLboolean _mesa_initialize_context( GLcontext *ctx, @@ -1399,7 +1400,6 @@ _mesa_initialize_context( GLcontext *ctx, ctx->VB = gl_vb_create_for_immediate( ctx ); if (!ctx->VB) { - FREE( ctx ); return GL_FALSE; } ctx->input = ctx->VB->IM; @@ -1407,7 +1407,6 @@ _mesa_initialize_context( GLcontext *ctx, ctx->PB = gl_alloc_pb(); if (!ctx->PB) { ALIGN_FREE( ctx->VB ); - FREE( ctx ); return GL_FALSE; } @@ -1421,7 +1420,6 @@ _mesa_initialize_context( GLcontext *ctx, if (!ctx->Shared) { ALIGN_FREE( ctx->VB ); FREE( ctx->PB ); - FREE( ctx ); return GL_FALSE; } } @@ -1453,7 +1451,6 @@ _mesa_initialize_context( GLcontext *ctx, free_shared_state(ctx, ctx->Shared); ALIGN_FREE( ctx->VB ); FREE( ctx->PB ); - FREE( ctx ); return GL_FALSE; } @@ -1484,7 +1481,6 @@ _mesa_initialize_context( GLcontext *ctx, FREE( ctx->PB ); if (ctx->Exec) FREE( ctx->Exec ); - FREE( ctx ); } _mesa_init_exec_table(ctx->Exec, dispatchSize); _mesa_init_dlist_table(ctx->Save, dispatchSize); -- 2.7.4