diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-04-04 19:02:15 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-04-16 09:34:02 +0100 |
commit | f12d52bfcae0792729b33a1fd1b2d23bd3fc7cf3 (patch) | |
tree | b6e0b4949a9e948df9eac6d7b619e9e5b2491dcf /test/show-glyphs-many.c | |
parent | ca501d99bbec432252cbb134d863801d4a792a44 (diff) | |
download | cairo-f12d52bfcae0792729b33a1fd1b2d23bd3fc7cf3.tar.gz |
[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.
Diffstat (limited to 'test/show-glyphs-many.c')
-rw-r--r-- | test/show-glyphs-many.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/show-glyphs-many.c b/test/show-glyphs-many.c index 9657e2830..dbfd6a1cd 100644 --- a/test/show-glyphs-many.c +++ b/test/show-glyphs-many.c @@ -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 */ |