projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
358aab1
)
mesa: protect against double-free in _vbo_DestroyContext()
author
Brian Paul
<brian.paul@tungstengraphics.com>
Tue, 16 Sep 2008 14:49:43 +0000
(08:49 -0600)
committer
Brian Paul
<brian.paul@tungstengraphics.com>
Tue, 16 Sep 2008 14:51:56 +0000
(08:51 -0600)
src/mesa/vbo/vbo_context.c
patch
|
blob
|
history
diff --git
a/src/mesa/vbo/vbo_context.c
b/src/mesa/vbo/vbo_context.c
index dc7c534251e225844fc1cd56b3784fe326bf5aee..b452ac8a38e2ef1f057f81a72fb54533f6b49d58 100644
(file)
--- a/
src/mesa/vbo/vbo_context.c
+++ b/
src/mesa/vbo/vbo_context.c
@@
-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;
+ }
}