summaryrefslogtreecommitdiff
path: root/src/parse/font_face.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse/font_face.c')
-rw-r--r--src/parse/font_face.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/parse/font_face.c b/src/parse/font_face.c
index 14a715d..8eab006 100644
--- a/src/parse/font_face.c
+++ b/src/parse/font_face.c
@@ -228,9 +228,8 @@ static css_error font_face_parse_src(css_language *c,
/* This will be inefficient if there are a lot of locations -
* probably not a problem in practice.
*/
- new_srcs = c->alloc(srcs,
- (n_srcs + 1) * sizeof(css_font_face_src),
- c->pw);
+ new_srcs = realloc(srcs,
+ (n_srcs + 1) * sizeof(css_font_face_src));
if (new_srcs == NULL) {
error = CSS_NOMEM;
goto cleanup;
@@ -252,7 +251,7 @@ cleanup:
if (error != CSS_OK) {
*ctx = orig_ctx;
if (srcs != NULL)
- c->alloc(srcs, 0, c->pw);
+ free(srcs);
}
return error;
@@ -382,8 +381,7 @@ css_error css__parse_font_descriptor(css_language *c,
bool match;
if (font_face == NULL) {
- error = css__font_face_create(c->sheet->alloc,
- c->sheet->pw, &font_face);
+ error = css__font_face_create(&font_face);
if (error != CSS_OK) {
return error;
}