From 1e89aab2dc0beb01f43a2397faa05a8cd01a7547 Mon Sep 17 00:00:00 2001 From: Søren Sandmann Date: Wed, 22 Aug 2012 15:27:09 -0400 Subject: uxa: Plug leak in uxa_glyphs_via_masks If prepare_composite() fails, we need to free the temporary mask before returning. --- src/uxa/uxa-glyphs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/uxa') diff --git a/src/uxa/uxa-glyphs.c b/src/uxa/uxa-glyphs.c index 997feb7..6dd8e58 100644 --- a/src/uxa/uxa-glyphs.c +++ b/src/uxa/uxa-glyphs.c @@ -992,8 +992,10 @@ uxa_glyphs_via_mask(CARD8 op, if (!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; } -- cgit v1.2.3