diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-01-07 13:49:17 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-01-08 13:00:45 +0100 |
commit | 948afc03e1385b1a26eaede946b67daace0376f4 (patch) | |
tree | 6703070465ab56770ec7b7800cbc1e8012a6d7d8 /source/pdf | |
parent | d06a3d89a455625cddec47f20cb7a4ef8ea60904 (diff) | |
download | mupdf-948afc03e1385b1a26eaede946b67daace0376f4.tar.xz |
pdf: Fix pdf_annot memory leak.
Diffstat (limited to 'source/pdf')
-rw-r--r-- | source/pdf/pdf-annot.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/pdf/pdf-annot.c b/source/pdf/pdf-annot.c index 84b0c3e1..f8e6a770 100644 --- a/source/pdf/pdf-annot.c +++ b/source/pdf/pdf-annot.c @@ -383,7 +383,7 @@ pdf_load_link_annots(fz_context *ctx, pdf_document *doc, pdf_obj *annots, const return head; } -void +static void pdf_drop_annot_imp(fz_context *ctx, pdf_annot *annot) { if (annot->ap) @@ -508,6 +508,7 @@ pdf_load_annots(fz_context *ctx, pdf_document *doc, pdf_page *page, pdf_obj *ann obj = pdf_array_get(ctx, annots, i); annot = fz_new_annot(ctx, sizeof(pdf_annot)); + annot->super.drop_annot_imp = (fz_annot_drop_imp_fn*)pdf_drop_annot_imp; annot->super.bound_annot = (fz_annot_bound_fn*)pdf_bound_annot; annot->super.run_annot = (fz_annot_run_fn*)pdf_run_annot; annot->super.next_annot = (fz_annot_next_fn*)pdf_next_annot; |