diff --git a/test/linear-gradient-large.c b/test/linear-gradient-large.c index f5e6a66a5..5646aa485 100644 --- a/test/linear-gradient-large.c +++ b/test/linear-gradient-large.c @@ -51,6 +51,7 @@ draw (cairo_t *cr, int width, int height) cairo_pattern_add_color_stop_rgb (gr, 1.0, 1, 1, 1); cairo_set_source (cr, gr); + cairo_pattern_destroy (gr); cairo_paint (cr); mark_point(cr, SIZE - OFFSET, OFFSET); diff --git a/test/nil-surface.c b/test/nil-surface.c index 408bdba34..30a1f97e5 100644 --- a/test/nil-surface.c +++ b/test/nil-surface.c @@ -154,7 +154,8 @@ draw (cairo_t *cr, int width, int height) /* Test that push_group doesn't crash */ cairo_push_group (cr2); cairo_stroke (cr2); - cairo_pop_group (cr2); + pattern = cairo_pop_group (cr2); + cairo_pattern_destroy (pattern); cairo_destroy (cr2);