st/glx: Fix leaks in xmesa_st_framebuffer.

The textures and surface of a framebuffer should be unreferenced when
the framebuffer is destroyed.
This commit is contained in:
Chia-I Wu
2010-03-13 00:52:47 +08:00
parent 9dae0e0ff8
commit 495bfb0ad2
@@ -225,6 +225,12 @@ void
xmesa_destroy_st_framebuffer(struct st_framebuffer_iface *stfbi)
{
struct xmesa_st_framebuffer *xstfb = xmesa_st_framebuffer(stfbi);
int i;
pipe_surface_reference(&xstfb->display_surface, NULL);
for (i = 0; i < ST_ATTACHMENT_COUNT; i++)
pipe_texture_reference(&xstfb->textures[i], NULL);
FREE(xstfb);
FREE(stfbi);