mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
mesa: protect against double-free in _vbo_DestroyContext()
This commit is contained in:
parent
358aab12c6
commit
4992806ae5
1 changed files with 6 additions and 4 deletions
|
|
@ -246,12 +246,14 @@ void _vbo_DestroyContext( GLcontext *ctx )
|
|||
ctx->aelt_context = NULL;
|
||||
}
|
||||
|
||||
vbo_exec_destroy(ctx);
|
||||
if (vbo_context(ctx)) {
|
||||
vbo_exec_destroy(ctx);
|
||||
#if FEATURE_dlist
|
||||
vbo_save_destroy(ctx);
|
||||
vbo_save_destroy(ctx);
|
||||
#endif
|
||||
FREE(vbo_context(ctx));
|
||||
ctx->swtnl_im = NULL;
|
||||
FREE(vbo_context(ctx));
|
||||
ctx->swtnl_im = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue