mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-03 16:00:34 +01:00
Fix some memory leaks in a few of the tests.
This commit is contained in:
parent
d6e204b9d5
commit
ca99478d43
4 changed files with 8 additions and 0 deletions
|
|
@ -109,6 +109,8 @@ draw (cairo_t *cr, int width, int height)
|
|||
}
|
||||
}
|
||||
|
||||
cairo_pattern_destroy (gradient);
|
||||
|
||||
return CAIRO_TEST_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue