From f9f144849ca9611dd46e6cbb27b9f1100371e455 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Mon, 18 Apr 2016 13:00:24 +0200 Subject: pdf: Remember to drop objects inserted into dicts. --- source/pdf/pdf-clean-file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/pdf/pdf-clean-file.c') 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); } } -- cgit v1.2.3