mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
mesa: fix double-freeing of dispatch tables inside glBegin/End.
We allocate dispatch tables for BeginEnd and OutsideBeginEnd. But
when we destroy the context we were freeing the BeginEnd and Exec
tables. If Exec==BeginEnd we did a double-free. This would happen
if the context was destroyed while inside a glBegin/End pair. Now
free the BeginEnd and OutsideBeginEnd pointers.
Cc: "10.1", "10.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit ef6b6658f9)
This commit is contained in:
parent
13b142a420
commit
07ada102cb
1 changed files with 2 additions and 2 deletions
|
|
@ -1112,7 +1112,7 @@ _mesa_initialize_context(struct gl_context *ctx,
|
|||
fail:
|
||||
_mesa_reference_shared_state(ctx, &ctx->Shared, NULL);
|
||||
free(ctx->BeginEnd);
|
||||
free(ctx->Exec);
|
||||
free(ctx->OutsideBeginEnd);
|
||||
free(ctx->Save);
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
|
@ -1213,7 +1213,7 @@ _mesa_free_context_data( struct gl_context *ctx )
|
|||
|
||||
/* free dispatch tables */
|
||||
free(ctx->BeginEnd);
|
||||
free(ctx->Exec);
|
||||
free(ctx->OutsideBeginEnd);
|
||||
free(ctx->Save);
|
||||
|
||||
/* Shared context state (display lists, textures, etc) */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue