summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Bornecrantz <wallbraker@gmail.com>2009-09-22 10:59:26 -0700
committerJakob Bornecrantz <wallbraker@gmail.com>2009-09-22 11:06:57 -0700
commitbade906ed131e35ed1782f4687760dcdca233299 (patch)
treedb5924b8e048e708dae2266697660e239d9b972d
parent19798e17feb3616ec301ada306a6fa3765077f56 (diff)
st/xorg: Fix two leeks
We where leaking both surfaces in the composit code and textures from pixmaps.
-rw-r--r--src/gallium/state_trackers/xorg/xorg_composite.c3
-rw-r--r--src/gallium/state_trackers/xorg/xorg_exa.c2
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 66ca4cb590..ed649a9d65 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 dea9f4c2bc..6507b2950e 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;