diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-01-07 13:37:48 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-01-08 13:00:45 +0100 |
commit | 63c8290faf4cec2c25a7ae4addde38ad2e5817f9 (patch) | |
tree | d1928c0bef84206e6d1db41a0e09b8d20d37315f /source/html/epub-doc.c | |
parent | a57d4a1eb389fe63fb92207e574f1e1691cf5e4c (diff) | |
download | mupdf-63c8290faf4cec2c25a7ae4addde38ad2e5817f9.tar.xz |
epub: Fix memory leaks.
Diffstat (limited to 'source/html/epub-doc.c')
-rw-r--r-- | source/html/epub-doc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/html/epub-doc.c b/source/html/epub-doc.c index 34285642..2f09fe50 100644 --- a/source/html/epub-doc.c +++ b/source/html/epub-doc.c @@ -179,6 +179,7 @@ epub_close_document(fz_context *ctx, fz_document *doc_) } fz_drop_archive(ctx, doc->zip); fz_drop_html_font_set(ctx, doc->set); + fz_drop_outline(ctx, doc->outline); fz_free(ctx, doc->dc_title); fz_free(ctx, doc->dc_creator); fz_free(ctx, doc); @@ -423,7 +424,7 @@ epub_init(fz_context *ctx, fz_archive *zip) { epub_document *doc; - doc = fz_malloc_struct(ctx, epub_document); + doc = fz_new_document(ctx, sizeof *doc); doc->zip = zip; doc->set = fz_new_html_font_set(ctx); |