diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-05-04 21:22:17 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-05-13 11:42:00 +0200 |
commit | 51bd5ba744a806d6b8ccfde7b8f51911a175f2fc (patch) | |
tree | 77d772aba28aa91c211c79f976caaa0c5fa69c0e | |
parent | 0d342fb664c36488bbc0d7f4ca0aa4ab5e7c85b8 (diff) | |
download | mupdf-51bd5ba744a806d6b8ccfde7b8f51911a175f2fc.tar.xz |
Fix double free and memory leak.
-rw-r--r-- | source/fitz/writer.c | 1 | ||||
-rw-r--r-- | source/pdf/pdf-font.c | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/source/fitz/writer.c b/source/fitz/writer.c index cb4ca77a..94f601b5 100644 --- a/source/fitz/writer.c +++ b/source/fitz/writer.c @@ -66,7 +66,6 @@ fz_close_document_writer(fz_context *ctx, fz_document_writer *wri) if (wri->close) wri->close(ctx, wri); wri->close = NULL; - fz_free(ctx, wri); } void diff --git a/source/pdf/pdf-font.c b/source/pdf/pdf-font.c index aa9a9d2f..02af35b7 100644 --- a/source/pdf/pdf-font.c +++ b/source/pdf/pdf-font.c @@ -1801,6 +1801,7 @@ pdf_add_to_unicode(fz_context *ctx, pdf_document *doc, fz_font *font) if (num_seq + num_chr == 0) { fz_warn(ctx, "cannot create ToUnicode mapping for %s", font->name); + fz_free(ctx, table); return NULL; } |