diff options
Diffstat (limited to 'source/html/html-doc.c')
-rw-r--r-- | source/html/html-doc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/html/html-doc.c b/source/html/html-doc.c index 101a4c42..6ad5c3e8 100644 --- a/source/html/html-doc.c +++ b/source/html/html-doc.c @@ -117,7 +117,8 @@ htdoc_open_document_with_stream(fz_context *ctx, fz_stream *file) html_document *doc; fz_buffer *buf; - doc = fz_malloc_struct(ctx, html_document); + doc = fz_new_document(ctx, sizeof *doc); + doc->super.close = htdoc_close_document; doc->super.layout = htdoc_layout; doc->super.count_pages = htdoc_count_pages; |