diff options
Diffstat (limited to 'source/pdf')
-rw-r--r-- | source/pdf/pdf-resources.c | 6 | ||||
-rw-r--r-- | source/pdf/pdf-xref.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/pdf/pdf-resources.c b/source/pdf/pdf-resources.c index 07fc873f..9b539fa9 100644 --- a/source/pdf/pdf-resources.c +++ b/source/pdf/pdf-resources.c @@ -202,10 +202,10 @@ pdf_init_resource_tables(fz_context *ctx, pdf_document *doc) { fz_try(ctx) { - doc->resources = fz_calloc(ctx, 1, sizeof(pdf_resource_tables)); - doc->resources->image = fz_calloc(ctx, 1, sizeof(pdf_res_table)); + doc->resources = fz_malloc_struct(ctx, pdf_resource_tables); + doc->resources->image = fz_malloc_struct(ctx, pdf_res_table); doc->resources->image->search = res_image_search; - doc->resources->font = fz_calloc(ctx, 1, sizeof(pdf_res_table)); + doc->resources->font = fz_malloc_struct(ctx, pdf_res_table); doc->resources->font->search = res_font_search; } fz_catch(ctx) diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c index f9f2f576..01b72d04 100644 --- a/source/pdf/pdf-xref.c +++ b/source/pdf/pdf-xref.c @@ -210,7 +210,7 @@ pdf_xref_entry *pdf_get_populating_xref_entry(fz_context *ctx, pdf_document *doc if (doc->num_xref_sections == 0) { - doc->xref_sections = fz_calloc(ctx, 1, sizeof(pdf_xref)); + doc->xref_sections = fz_malloc_struct(ctx, pdf_xref); doc->num_xref_sections = 1; } @@ -1365,7 +1365,7 @@ pdf_read_ocg(fz_context *ctx, pdf_document *doc) len = pdf_array_len(ctx, ocg); fz_try(ctx) { - desc = fz_calloc(ctx, 1, sizeof(*desc)); + desc = fz_malloc_struct(ctx, pdf_ocg_descriptor); desc->len = len; desc->ocgs = fz_calloc(ctx, len, sizeof(*desc->ocgs)); desc->intent = NULL; |