if (unlikely (status))
return status;
- font = malloc (sizeof (cairo_truetype_font_t));
+ font = _cairo_malloc (sizeof (cairo_truetype_font_t));
if (unlikely (font == NULL))
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
/* If the PS name is not found, create a CairoFont-x-y name. */
if (font->base.ps_name == NULL) {
- font->base.ps_name = malloc (30);
+ font->base.ps_name = _cairo_malloc (30);
if (unlikely (font->base.ps_name == NULL)) {
status = _cairo_error (CAIRO_STATUS_NO_MEMORY);
goto fail3;
else
size = sizeof (int32_t) * (font->num_glyphs_in_face + 1);
- u.bytes = malloc (size);
+ u.bytes = _cairo_malloc (size);
if (unlikely (u.bytes == NULL))
return _cairo_truetype_font_set_error (font, CAIRO_STATUS_NO_MEMORY);
truetype_subset->descent = (double)font->base.descent/font->base.units_per_em;
if (length) {
- truetype_subset->data = malloc (length);
+ truetype_subset->data = _cairo_malloc (length);
if (unlikely (truetype_subset->data == NULL)) {
status = _cairo_error (CAIRO_STATUS_NO_MEMORY);
goto fail4;
if (num_strings) {
offsets_length = num_strings * sizeof (unsigned long);
- truetype_subset->string_offsets = malloc (offsets_length);
+ truetype_subset->string_offsets = _cairo_malloc (offsets_length);
if (unlikely (truetype_subset->string_offsets == NULL)) {
status = _cairo_error (CAIRO_STATUS_NO_MEMORY);
goto fail5;
for (i = 0; i < u_len; i++)
size += _cairo_ucs4_to_utf8 (be16_to_cpu(u[i]), NULL);
- utf8 = malloc (size + 1);
+ utf8 = _cairo_malloc (size + 1);
if (utf8 == NULL) {
status =_cairo_error (CAIRO_STATUS_NO_MEMORY);
goto fail;
}
}
if (has_tag) {
- p = malloc (len - 6);
+ p = _cairo_malloc (len - 6);
if (unlikely (p == NULL)) {
status =_cairo_error (CAIRO_STATUS_NO_MEMORY);
goto fail;
if (status)
return status;
- name = malloc (size);
+ name = _cairo_malloc (size);
if (name == NULL)
return _cairo_error (CAIRO_STATUS_NO_MEMORY);