From f12d52bfcae0792729b33a1fd1b2d23bd3fc7cf3 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 4 Apr 2009 19:02:15 +0100 Subject: [PATCH] [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. --- test/show-glyphs-many.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */