diff options
author | Carl Worth <cworth@cworth.org> | 2006-08-08 12:48:56 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2006-08-08 12:48:56 -0700 |
commit | ca99478d4309ee66bfd0196d3d53991a46fa8367 (patch) | |
tree | 96deea3396a50f33f96dcd78cba9857555f90839 /test | |
parent | d6e204b9d58069ba34969e6f23cf0bdb4c73b9e1 (diff) |
Fix some memory leaks in a few of the tests.
Diffstat (limited to 'test')
-rw-r--r-- | test/push-group.c | 2 | ||||
-rw-r--r-- | test/text-antialias-gray.c | 2 | ||||
-rw-r--r-- | test/text-antialias-none.c | 2 | ||||
-rw-r--r-- | test/zero-alpha.c | 2 |
4 files changed, 8 insertions, 0 deletions
diff --git a/test/push-group.c b/test/push-group.c index 0c6e50b6f..4e6fed059 100644 --- a/test/push-group.c +++ b/test/push-group.c @@ -109,6 +109,8 @@ draw (cairo_t *cr, int width, int height) } } + cairo_pattern_destroy (gradient); + return CAIRO_TEST_SUCCESS; } diff --git a/test/text-antialias-gray.c b/test/text-antialias-gray.c index 8090d8e06..dd0f34e5f 100644 --- a/test/text-antialias-gray.c +++ b/test/text-antialias-gray.c @@ -61,6 +61,8 @@ draw (cairo_t *cr, int width, int height) cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_GRAY); cairo_set_font_options (cr, font_options); + cairo_font_options_destroy (font_options); + cairo_set_source_rgb (cr, 0, 0, 0); /* black */ cairo_text_extents (cr, black, &extents); cairo_move_to (cr, -extents.x_bearing, -extents.y_bearing); diff --git a/test/text-antialias-none.c b/test/text-antialias-none.c index f9c86a9a7..f53fde491 100644 --- a/test/text-antialias-none.c +++ b/test/text-antialias-none.c @@ -61,6 +61,8 @@ draw (cairo_t *cr, int width, int height) cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_NONE); cairo_set_font_options (cr, font_options); + cairo_font_options_destroy (font_options); + cairo_set_source_rgb (cr, 0, 0, 0); /* black */ cairo_text_extents (cr, black, &extents); cairo_move_to (cr, -extents.x_bearing, -extents.y_bearing); diff --git a/test/zero-alpha.c b/test/zero-alpha.c index 833e24c9b..9a01b22d7 100644 --- a/test/zero-alpha.c +++ b/test/zero-alpha.c @@ -90,6 +90,8 @@ draw (cairo_t *cr, int width, int height) for (i=0; i < REPS; i++) cairo_paint (cr); + cairo_surface_destroy (surface); + return CAIRO_TEST_SUCCESS; } |