summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-xref.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/pdf/pdf-xref.c')
-rw-r--r--source/pdf/pdf-xref.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
index 3bcf5d79..32b1d6a2 100644
--- a/source/pdf/pdf-xref.c
+++ b/source/pdf/pdf-xref.c
@@ -1626,6 +1626,8 @@ pdf_close_document(fz_context *ctx, pdf_document *doc)
pdf_lexbuf_fin(ctx, &doc->lexbuf.base);
+ pdf_resource_table_free(ctx, doc);
+
fz_free(ctx, doc);
}
@@ -2744,6 +2746,7 @@ pdf_document *pdf_create_document(fz_context *ctx)
doc->num_incremental_sections = 0;
doc->xref_base = 0;
doc->disallow_new_increments = 0;
+ pdf_resource_table_init(ctx, doc);
pdf_get_populating_xref_entry(ctx, doc, 0);
trailer = pdf_new_dict(ctx, doc, 2);
pdf_dict_put_drop(ctx, trailer, PDF_NAME_Size, pdf_new_int(ctx, doc, 3));