summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-04-13 11:19:09 +0100
committerRobin Watts <robin.watts@artifex.com>2016-04-18 10:51:22 +0100
commit8e1cd871076f93e45faac787e633ae73ddd67bdb (patch)
treed58773ae81792b0108c9a7daebd10c8eacbb6519
parent327a3dff5a6beeeb71c6390ba399d9f407b23373 (diff)
downloadmupdf-8e1cd871076f93e45faac787e633ae73ddd67bdb.tar.xz
Fix leak of pdf_obj.
Use pdf_dict_put_drop rather than pdf_dict_put to avoid leaking int pdf_obj.
-rw-r--r--source/pdf/pdf-clean-file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/pdf/pdf-clean-file.c b/source/pdf/pdf-clean-file.c
index 587f70b6..af0d6857 100644
--- a/source/pdf/pdf-clean-file.c
+++ b/source/pdf/pdf-clean-file.c
@@ -162,7 +162,7 @@ static int strip_outlines(fz_context *ctx, pdf_document *doc, pdf_obj *outlines,
int old_count = pdf_to_int(ctx, pdf_dict_get(ctx, outlines, PDF_NAME_Count));
pdf_dict_put(ctx, outlines, PDF_NAME_First, first);
pdf_dict_put(ctx, outlines, PDF_NAME_Last, last);
- pdf_dict_put(ctx, outlines, PDF_NAME_Count, pdf_new_int(ctx, doc, old_count > 0 ? nc : -nc));
+ pdf_dict_put_drop(ctx, outlines, PDF_NAME_Count, pdf_new_int(ctx, doc, old_count > 0 ? nc : -nc));
}
return nc;