summaryrefslogtreecommitdiff
path: root/test/a8-mask.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2005-08-05 15:48:42 +0000
committerCarl Worth <cworth@cworth.org>2005-08-05 15:48:42 +0000
commit5925e3520fbf6223804d5c5e81698d7cdd888620 (patch)
tree3d240f81ba921ec692f948a44c7db706a4705ca7 /test/a8-mask.c
parent53bd9879bb802606789be76e5653e2fb6781f676 (diff)
downloadcairo-5925e3520fbf6223804d5c5e81698d7cdd888620.tar.gz
Patch memory leaks.
Diffstat (limited to 'test/a8-mask.c')
-rw-r--r--test/a8-mask.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/test/a8-mask.c b/test/a8-mask.c
index e255c4ffb..2895037ee 100644
--- a/test/a8-mask.c
+++ b/test/a8-mask.c
@@ -42,24 +42,25 @@ static unsigned char mask[] = {
0x0, 0x0, 0xff, 0x0, 0xff, 0x0, 0x0
};
-
-
static cairo_test_status_t
draw (cairo_t *cr, int width, int height)
{
- cairo_surface_t *image;
+ cairo_surface_t *surface;
cairo_pattern_t *pattern;
cairo_set_source_rgb (cr, 0, 0, 1);
cairo_paint (cr);
- image = cairo_image_surface_create_for_data (mask, CAIRO_FORMAT_A8,
- 7, 8, 7);
- pattern = cairo_pattern_create_for_surface (image);
+ surface = cairo_image_surface_create_for_data (mask, CAIRO_FORMAT_A8,
+ 7, 8, 7);
+ pattern = cairo_pattern_create_for_surface (surface);
cairo_set_source_rgb (cr, 1, 0, 0);
cairo_mask (cr, pattern);
+ cairo_pattern_destroy (pattern);
+ cairo_surface_destroy (surface);
+
return CAIRO_TEST_SUCCESS;
}
@@ -67,5 +68,5 @@ int
main (void)
{
return cairo_test_expect_failure (&test, draw,
- "only image fails");
+ "image backend fails (unknown cause)");
}