diff options
author | Marek Olšák <[email protected]> | 2010-07-19 20:47:30 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-07-19 21:12:52 +0200 |
commit | 3b189d888a99336a2df037e2b595844d4b9e05b5 (patch) | |
tree | 507e8df95352054c706d50fdee32f8eae531a2d0 | |
parent | fd03dd203f19301520d16de58552cc2fec5e6115 (diff) |
r300g: fix possible crash in destroy_context
The problem is destroy_context is almost NEVER called.
The only test for destroy_context I know is compiz.
Reported by Vinson Lee.
FDO bug #29150.
-rw-r--r-- | src/gallium/drivers/r300/r300_context.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index 5093c147462..df903590583 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -122,6 +122,8 @@ static void r300_destroy_context(struct pipe_context* context) util_mempool_destroy(&r300->pool_transfers); + r300_update_num_contexts(r300->screen, -1); + FREE(r300->aa_state.state); FREE(r300->blend_color_state.state); FREE(r300->clip_state.state); @@ -141,8 +143,6 @@ static void r300_destroy_context(struct pipe_context* context) FREE(r300->vertex_stream_state.state); } FREE(r300); - - r300_update_num_contexts(r300->screen, -1); } void r300_flush_cb(void *data) |