summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Watts <robin@peeves.(none)>2013-11-26 03:06:28 -0800
committerRobin Watts <robin@peeves.(none)>2013-11-26 10:41:04 -0800
commit2c786be7bc6fd1378ebfde5583f2560ca460a017 (patch)
tree8dea28d570fe08d697b5745bb5c9882066b8ebd6
parente1d7a913f08446b77071ea71e4aef89588d68334 (diff)
downloadmupdf-2c786be7bc6fd1378ebfde5583f2560ca460a017.tar.xz
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.
-rw-r--r--source/pdf/pdf-function.c1
1 files changed, 0 insertions, 1 deletions
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));
}