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 <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2010-10-15 10:28:32 +01:00
parent 22cdb7041f
commit 42ecc427f3
2 changed files with 6 additions and 2 deletions

View file

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

View file

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