summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-07 22:18:10 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-05-07 22:19:43 +0100
commite6180d1d5e29a91f1bfc20956bb017ab74fb8b8e (patch)
treea232f88f216ca083b23128bbdd2bca1950a87cda
parent01a208f7e3785254dc101f09a73943ec7cfb1d6e (diff)
surface-fallback: Only destroy the clip after it has been initialized.
More memfault detected error path errors.
-rw-r--r--src/cairo-surface-fallback.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cairo-surface-fallback.c b/src/cairo-surface-fallback.c
index 25d03e62..07ab60da 100644
--- a/src/cairo-surface-fallback.c
+++ b/src/cairo-surface-fallback.c
@@ -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;