summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-clean-file.c
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2016-04-18 13:00:24 +0200
committerRobin Watts <robin.watts@artifex.com>2016-04-22 17:26:48 +0100
commitf9f144849ca9611dd46e6cbb27b9f1100371e455 (patch)
treec2bc1b4be466822d624dbecdc8668c593c6cef90 /source/pdf/pdf-clean-file.c
parentf88bfe2e62dbadb96d4f52d7aa025f0a516078da (diff)
downloadmupdf-f9f144849ca9611dd46e6cbb27b9f1100371e455.tar.xz
pdf: Remember to drop objects inserted into dicts.
Diffstat (limited to 'source/pdf/pdf-clean-file.c')
-rw-r--r--source/pdf/pdf-clean-file.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/pdf/pdf-clean-file.c b/source/pdf/pdf-clean-file.c
index af0d6857..05f5a7fc 100644
--- a/source/pdf/pdf-clean-file.c
+++ b/source/pdf/pdf-clean-file.c
@@ -281,9 +281,8 @@ static void retainpages(fz_context *ctx, globals *glo, int argc, char **argv)
if (dest_is_valid_page(ctx, dest, page_object_nums, pagecount))
{
pdf_obj *key_str = pdf_new_string(ctx, doc, pdf_to_name(ctx, key), strlen(pdf_to_name(ctx, key)));
- pdf_array_push(ctx, names_list, key_str);
+ pdf_array_push_drop(ctx, names_list, key_str);
pdf_array_push(ctx, names_list, val);
- pdf_drop_obj(ctx, key_str);
}
}