diff options
author | Chia-I Wu <olv@lunarg.com> | 2010-03-13 00:52:47 +0800 |
---|---|---|
committer | Chia-I Wu <olv@lunarg.com> | 2010-03-13 13:06:00 +0800 |
commit | 495bfb0ad2e60638e7b2e94f36f0079e3f450091 (patch) | |
tree | 61cf88ca17ef997162fdb9f0f12950fa46bd60ec | |
parent | 9dae0e0ff88957d16db47130a2646179fb5fc267 (diff) | |
download | external_mesa3d-495bfb0ad2e60638e7b2e94f36f0079e3f450091.zip external_mesa3d-495bfb0ad2e60638e7b2e94f36f0079e3f450091.tar.gz external_mesa3d-495bfb0ad2e60638e7b2e94f36f0079e3f450091.tar.bz2 |
st/glx: Fix leaks in xmesa_st_framebuffer.
The textures and surface of a framebuffer should be unreferenced when
the framebuffer is destroyed.
-rw-r--r-- | src/gallium/state_trackers/glx/xlib/xm_st.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/glx/xlib/xm_st.c b/src/gallium/state_trackers/glx/xlib/xm_st.c index 3b5f78e..d462776 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_st.c +++ b/src/gallium/state_trackers/glx/xlib/xm_st.c @@ -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); |