summaryrefslogtreecommitdiff
path: root/src/uxa
diff options
context:
space:
mode:
authorSøren Sandmann <ssp@redhat.com>2012-08-22 15:27:09 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2012-09-05 18:17:21 -0400
commit1e89aab2dc0beb01f43a2397faa05a8cd01a7547 (patch)
tree2f5099e7be9243858015f6f414aea8a73a803802 /src/uxa
parentafd8d20b84a4b4e9b22483e379d594517333e8c7 (diff)
uxa: Plug leak in uxa_glyphs_via_masks
If prepare_composite() fails, we need to free the temporary mask before returning.
Diffstat (limited to 'src/uxa')
-rw-r--r--src/uxa/uxa-glyphs.c4
1 files changed, 3 insertions, 1 deletions
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;
}