diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-03-30 16:39:36 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-03-30 18:18:00 +0100 |
commit | 9ccdd63f008d865b87e9f55b24a0276670844786 (patch) | |
tree | 64f2ccb5a33c08b0b13e89b2a70c5e5f491ea229 /source/html/html-doc.c | |
parent | f863e1ad7ecf0e67db5906f9562682a2e7ae7b5f (diff) | |
download | mupdf-9ccdd63f008d865b87e9f55b24a0276670844786.tar.xz |
Use fz_new_document for pdf and html docs.
In particular for html docs we were getting the refcount wrong,
causing us to leak on closedown.
Diffstat (limited to 'source/html/html-doc.c')
-rw-r--r-- | source/html/html-doc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/html/html-doc.c b/source/html/html-doc.c index 6ad5c3e8..23f1195b 100644 --- a/source/html/html-doc.c +++ b/source/html/html-doc.c @@ -144,7 +144,7 @@ htdoc_open_document(fz_context *ctx, const char *filename) fz_dirname(dirname, filename, sizeof dirname); - 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; |