From 42ecc427f361bcce68d529ae308ab65ff14ecea8 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 15 Oct 2010 10:28:32 +0100 Subject: [PATCH] xcb,image: Fix a missing clip fini Spotted by Uli Schlachter when I copied the image glyphs clipping to xcb. Signed-off-by: Chris Wilson --- src/cairo-image-surface.c | 4 +++- src/cairo-xcb-surface-render.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c index 491859f74..5b2c06341 100644 --- a/src/cairo-image-surface.c +++ b/src/cairo-image-surface.c @@ -4043,8 +4043,10 @@ _cairo_image_surface_glyphs (void *abstract_surface, if (clip != NULL && extents.is_bounded) { clip = _cairo_clip_init_copy (&local_clip, clip); status = _cairo_clip_rectangle (clip, &extents.bounded); - if (unlikely (status)) + if (unlikely (status)) { + _cairo_clip_fini (&local_clip); return status; + } have_clip = TRUE; } diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c index 208d94006..54839d5df 100644 --- a/src/cairo-xcb-surface-render.c +++ b/src/cairo-xcb-surface-render.c @@ -4628,8 +4628,10 @@ _cairo_xcb_surface_render_glyphs (cairo_xcb_surface_t *surface, if (clip != NULL && extents.is_bounded) { clip = _cairo_clip_init_copy (&local_clip, clip); status = _cairo_clip_rectangle (clip, &extents.bounded); - if (unlikely (status)) + if (unlikely (status)) { + _cairo_clip_fini (&local_clip); return status; + } have_clip = TRUE; }