mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-06 15:30:18 +01:00
[test] Use xmalloc() to evade memfault.
Do not use the simple malloc() as memfault will inject allocation failures (unlike xmalloc() for which faults are excluded) - as this is unnecessary inside the test harness and thus does not exercise any cairo code paths.
This commit is contained in:
parent
ca501d99bb
commit
f12d52bfca
1 changed files with 1 additions and 1 deletions
|
|
@ -109,7 +109,7 @@ get_glyph (cairo_t *cr, const char *utf8, cairo_glyph_t *glyph)
|
|||
static cairo_test_status_t
|
||||
draw (cairo_t *cr, int width, int height)
|
||||
{
|
||||
cairo_glyph_t *glyphs = malloc(NUM_GLYPHS * sizeof(cairo_glyph_t));
|
||||
cairo_glyph_t *glyphs = xmalloc (NUM_GLYPHS * sizeof (cairo_glyph_t));
|
||||
const char *characters[] = { /* try to exercise different widths of index */
|
||||
"m", /* Latin letter m, index=0x50 */
|
||||
"μ", /* Greek letter mu, index=0x349 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue