Module: Mesa Branch: master Commit: bade906ed131e35ed1782f4687760dcdca233299 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bade906ed131e35ed1782f4687760dcdca233299
Author: Jakob Bornecrantz <[email protected]> Date: Tue Sep 22 10:59:26 2009 -0700 st/xorg: Fix two leeks We where leaking both surfaces in the composit code and textures from pixmaps. --- src/gallium/state_trackers/xorg/xorg_composite.c | 3 +++ src/gallium/state_trackers/xorg/xorg_exa.c | 2 ++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/gallium/state_trackers/xorg/xorg_composite.c b/src/gallium/state_trackers/xorg/xorg_composite.c index 66ca4cb..ed649a9 100644 --- a/src/gallium/state_trackers/xorg/xorg_composite.c +++ b/src/gallium/state_trackers/xorg/xorg_composite.c @@ -359,6 +359,9 @@ bind_framebuffer_state(struct exa_context *exa, struct exa_pixmap_priv *pDst) state.zsbuf = 0; cso_set_framebuffer(exa->cso, &state); + + /* we do fire and forget for the framebuffer, this is the forget part */ + pipe_surface_reference(&surface, NULL); } enum AxisOrientation { diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c index dea9f4c..6507b29 100644 --- a/src/gallium/state_trackers/xorg/xorg_exa.c +++ b/src/gallium/state_trackers/xorg/xorg_exa.c @@ -671,6 +671,8 @@ ExaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, #endif pipe_texture_reference(&priv->tex, texture); + /* the texture we create has one reference */ + pipe_texture_reference(&texture, NULL); } return TRUE; _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
