[Mesa-dev] [PATCH 2/2] mesa: Don't leak gl_context::BeginEnd at context destruction

Brian Paul brianp at vmware.com
Wed Apr 10 08:08:23 PDT 2013


On 04/10/2013 09:01 AM, Ian Romanick wrote:
> From: Ian Romanick<ian.d.romanick at intel.com>
>
> 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<ian.d.romanick at intel.com>
> ---
>   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 939f896..d77740e 100644
> --- a/src/mesa/main/context.c
> +++ b/src/mesa/main/context.c
> @@ -1181,6 +1181,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);
>

For both:
Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the mesa-dev mailing list