From 2c786be7bc6fd1378ebfde5583f2560ca460a017 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 26 Nov 2013 03:06:28 -0800 Subject: Bug 694113: Solve double free causing valgrind warnings. In case of an unknown function type, we free 'func'. Then we later read func->type out of the block, and drop the block. Simple solution is not to free the block initially and to let the drop of the block do it for us. --- source/pdf/pdf-function.c | 1 - 1 file changed, 1 deletion(-) (limited to 'source/pdf') diff --git a/source/pdf/pdf-function.c b/source/pdf/pdf-function.c index aee546ca..7725544c 100644 --- a/source/pdf/pdf-function.c +++ b/source/pdf/pdf-function.c @@ -1695,7 +1695,6 @@ pdf_load_function(pdf_document *doc, pdf_obj *dict, int in, int out) break; default: - fz_free(ctx, func); fz_throw(ctx, FZ_ERROR_GENERIC, "unknown function type (%d %d R)", pdf_to_num(dict), pdf_to_gen(dict)); } -- cgit v1.2.3