From ca775cbf5a7245092cabdda43db9d06e96613ff4 Mon Sep 17 00:00:00 2001 From: Andrea Canciani Date: Thu, 26 Aug 2010 11:13:51 +0200 Subject: [PATCH] test: do not leak resources Silence two leak reports by check-valgrind. Reviewed-by: Chris Wilson --- test/linear-gradient-large.c | 1 + test/nil-surface.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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);