From f84f6ecaa46d6e6ab1ebdf024fddc46bfacf2c0c Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 12 Oct 2011 17:09:12 +0100 Subject: [PATCH] gstate: Prevent leak of old clip when creating a group with translation Signed-off-by: Chris Wilson --- src/cairo-gstate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c index c37fd8b40..d232f9b51 100644 --- a/src/cairo-gstate.c +++ b/src/cairo-gstate.c @@ -319,6 +319,7 @@ _cairo_gstate_redirect_target (cairo_gstate_t *gstate, cairo_surface_t *child) /* The clip is in surface backend coordinates for the previous target; * translate it into the child's backend coordinates. */ + _cairo_clip_destroy (gstate->clip); gstate->clip = _cairo_clip_copy_with_translation (gstate->next->clip, child->device_transform.x0 - gstate->parent_target->device_transform.x0, child->device_transform.y0 - gstate->parent_target->device_transform.y0);