From 79f8bcab6185b9ae0c7b49772557d72000ba352b Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 10 Apr 2013 07:50:49 -0700 Subject: mesa: Don't leak gl_context::BeginEnd at context destruction The other dispatch tables (Exec and Save) are freed, but BeginEnd is never freed. This was found by inspection why investigating the leak of shared state in _mesa_initialize_context. NOTE: This is a candidate for stable branches Signed-off-by: Ian Romanick Reviewed-by: Brian Paul (cherry picked from commit 1faaa411c7039b8b6e2118d8621ca940c674c2d4) --- src/mesa/main/context.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 203fb7fd9a..9b154f9159 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1145,6 +1145,7 @@ _mesa_free_context_data( struct gl_context *ctx ) _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, NULL); /* free dispatch tables */ + free(ctx->BeginEnd); free(ctx->Exec); free(ctx->Save); -- cgit v1.2.3