[cairo] Use hb_malloc / hb_free

This commit is contained in:
Behdad Esfahbod 2023-01-25 15:22:27 -07:00
parent a9392c0cbb
commit 57352b8bd4
1 changed files with 6 additions and 6 deletions

View File

@ -293,7 +293,7 @@ _hb_cairo_paint_linear_gradient (hb_cairo_context_t *c,
len = hb_color_line_get_color_stops (color_line, 0, nullptr, nullptr);
if (len > PREALLOCATED_COLOR_STOPS)
stops = (hb_color_stop_t *) malloc (len * sizeof (hb_color_stop_t));
stops = (hb_color_stop_t *) hb_malloc (len * sizeof (hb_color_stop_t));
hb_color_line_get_color_stops (color_line, 0, &len, stops);
_hb_cairo_reduce_anchors (x0, y0, x1, y1, x2, y2, &xx0, &yy0, &xx1, &yy1);
@ -322,7 +322,7 @@ _hb_cairo_paint_linear_gradient (hb_cairo_context_t *c,
cairo_pattern_destroy (pattern);
if (stops != stops_)
free (stops);
hb_free (stops);
}
void
@ -374,7 +374,7 @@ _hb_cairo_paint_radial_gradient (hb_cairo_context_t *c,
cairo_pattern_destroy (pattern);
if (stops != stops_)
free (stops);
hb_free (stops);
}
typedef struct {
@ -784,9 +784,9 @@ _hb_cairo_add_sweep_gradient_patches (hb_color_stop_t *stops,
done:
if (angles != angles_)
free (angles);
hb_free (angles);
if (colors != colors_)
free (colors);
hb_free (colors);
}
void
@ -830,7 +830,7 @@ _hb_cairo_paint_sweep_gradient (hb_cairo_context_t *c,
cairo_pattern_destroy (pattern);
if (stops != stops_)
free (stops);
hb_free (stops);
}
#endif