From 635abed109b26ded34954c379b80e306c602384b Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 26 May 2008 13:30:10 -0600 Subject: [PATCH] gallium: free renderbuffer's old texture in st_renderbuffer_alloc_storage() --- src/mesa/state_tracker/st_cb_fbo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index 3560a040c85..76145a4d5c4 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -92,10 +92,11 @@ st_renderbuffer_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb, struct pipe_texture template; unsigned surface_usage; - /* Free the old surface (and texture if we hold the last - * reference): + /* Free the old surface and texture */ pipe_surface_reference( &strb->surface, NULL ); + pipe_texture_reference( &strb->texture, NULL ); + memset(&template, 0, sizeof(template)); -- 2.30.2