test: do not leak resources

Silence two leak reports by check-valgrind.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Andrea Canciani 2010-08-26 11:13:51 +02:00
parent 2b6c4c2a64
commit ca775cbf5a
2 changed files with 3 additions and 1 deletions

View file

@ -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_pattern_add_color_stop_rgb (gr, 1.0, 1, 1, 1);
cairo_set_source (cr, gr); cairo_set_source (cr, gr);
cairo_pattern_destroy (gr);
cairo_paint (cr); cairo_paint (cr);
mark_point(cr, SIZE - OFFSET, OFFSET); mark_point(cr, SIZE - OFFSET, OFFSET);

View file

@ -154,7 +154,8 @@ draw (cairo_t *cr, int width, int height)
/* Test that push_group doesn't crash */ /* Test that push_group doesn't crash */
cairo_push_group (cr2); cairo_push_group (cr2);
cairo_stroke (cr2); cairo_stroke (cr2);
cairo_pop_group (cr2); pattern = cairo_pop_group (cr2);
cairo_pattern_destroy (pattern);
cairo_destroy (cr2); cairo_destroy (cr2);