From: Jakob Bornecrantz Date: Tue, 22 Sep 2009 17:59:26 +0000 (-0700) Subject: st/xorg: Fix two leeks X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bade906ed131e35ed1782f4687760dcdca233299;p=mesa.git st/xorg: Fix two leeks We where leaking both surfaces in the composit code and textures from pixmaps. --- diff --git a/src/gallium/state_trackers/xorg/xorg_composite.c b/src/gallium/state_trackers/xorg/xorg_composite.c index 66ca4cb5905..ed649a9d652 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 dea9f4c2bc3..6507b2950e2 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;