mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-06 03:40:35 +02:00
llvmpipe: fix double free
This commit is contained in:
parent
601969c587
commit
b08583da46
4 changed files with 6 additions and 6 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue