summaryrefslogtreecommitdiff
path: root/uxa
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-04-14 19:03:25 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-04-14 20:45:29 +0100
commita16616209bb2dcb7aaa859b38e154f0a10faa82b (patch)
tree59eb85b0d3c83cc294b15f7a60c9ef7472a5a0ab /uxa
parentae145c21e9fd3a12164f8b4720d059f9c158249e (diff)
uxa: Fix leak of glyph mask for unhandled glyph composition
==1401== 7,344 bytes in 34 blocks are possibly lost in loss record 570 of 587 ==1401== at 0x4027034: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==1401== by 0x8BE5150: drm_intel_gem_bo_alloc_internal (intel_bufmgr_gem.c:689) ==1401== by 0x899FC04: intel_uxa_create_pixmap (intel_uxa.c:1077) ==1401== by 0x89C2C41: uxa_glyphs (uxa-glyphs.c:254) ==1401== by 0x21F05E: damageGlyphs (damage.c:647) ==1401== by 0x218E06: ProcRenderCompositeGlyphs (render.c:1434) ==1401== by 0x15AA40: Dispatch (dispatch.c:439) ==1401== by 0x1499E9: main (main.c:287) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'uxa')
-rw-r--r--uxa/uxa-glyphs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c
index b754f4e0..921b99c9 100644
--- a/uxa/uxa-glyphs.c
+++ b/uxa/uxa-glyphs.c
@@ -812,8 +812,10 @@ uxa_glyphs_via_mask(CARD8 op,
if (!uxa_pixmap_is_offscreen(src_pixmap) ||
!uxa_screen->info->prepare_composite(PictOpAdd,
this_atlas, NULL, mask,
- src_pixmap, NULL, pixmap))
+ src_pixmap, NULL, pixmap)) {
+ FreePicture(mask, 0);
return -1;
+ }
glyph_atlas = this_atlas;
}