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>
This commit is contained in:
Chris Wilson 2012-04-14 19:03:25 +01:00
parent ae145c21e9
commit a16616209b
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}