surface-fallback: Only destroy the clip after it has been initialized.

More memfault detected error path errors.
This commit is contained in:
Chris Wilson 2010-05-07 22:18:10 +01:00
parent 01a208f7e3
commit e6180d1d5e

View file

@ -298,7 +298,7 @@ _clip_and_composite_combine (cairo_clip_t *clip,
extents->width, extents->height,
NULL);
if (unlikely (status))
goto CLEANUP_SURFACE;
goto CLEANUP_CLIP;
/* Punch the clip out of the destination */
status = _cairo_surface_composite (CAIRO_OPERATOR_DEST_OUT,
@ -310,7 +310,7 @@ _clip_and_composite_combine (cairo_clip_t *clip,
extents->width, extents->height,
NULL);
if (unlikely (status))
goto CLEANUP_SURFACE;
goto CLEANUP_CLIP;
/* Now add the two results together */
_cairo_pattern_init_for_surface (&pattern, intermediate);
@ -323,8 +323,9 @@ _clip_and_composite_combine (cairo_clip_t *clip,
NULL);
_cairo_pattern_fini (&pattern.base);
CLEANUP_SURFACE:
CLEANUP_CLIP:
_cairo_pattern_fini (&clip_pattern.base);
CLEANUP_SURFACE:
cairo_surface_destroy (intermediate);
return status;