llvmpipe: fix double free

This commit is contained in:
Keith Whitwell 2010-01-06 17:13:37 +00:00
parent 601969c587
commit b08583da46
4 changed files with 6 additions and 6 deletions

View file

@ -53,12 +53,11 @@ static void llvmpipe_destroy( struct pipe_context *pipe )
struct llvmpipe_context *llvmpipe = llvmpipe_context( pipe );
uint i;
/* This will also destroy llvmpipe->setup:
*/
if (llvmpipe->draw)
draw_destroy( llvmpipe->draw );
if (llvmpipe->setup)
lp_setup_destroy( llvmpipe->setup );
for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
pipe_surface_reference(&llvmpipe->framebuffer.cbufs[i], NULL);
}

View file

@ -571,7 +571,8 @@ lp_setup_update_state( struct setup_context *setup )
/* Only caller is lp_setup_vbuf_destroy()
*/
void
lp_setup_destroy( struct setup_context *setup )
{

View file

@ -128,7 +128,5 @@ void
lp_setup_set_vertex_info( struct setup_context *setup,
struct vertex_info *info );
void
lp_setup_destroy( struct setup_context *setup );
#endif

View file

@ -141,4 +141,6 @@ void lp_setup_init_vbuf(struct setup_context *setup);
void lp_setup_update_state( struct setup_context *setup );
void lp_setup_destroy( struct setup_context *setup );
#endif