summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2016-10-11 19:06:22 +0800
committerSebastian Rasmussen <sebras@gmail.com>2016-10-11 19:06:22 +0800
commit28d9c75ed780414a7ae71cab88cc86536444b255 (patch)
tree52d2d43bc498b30b003bd658d2781d49faf32d15 /source/fitz
parent34b5ec0c2ae66511adb65d246287132f11abb3d4 (diff)
downloadmupdf-28d9c75ed780414a7ae71cab88cc86536444b255.tar.xz
Free document in fz_drop_document(), not in subclassing documents.
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/document.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/fitz/document.c b/source/fitz/document.c
index 4c02f1c4..d783bc70 100644
--- a/source/fitz/document.c
+++ b/source/fitz/document.c
@@ -163,8 +163,11 @@ void
fz_drop_document(fz_context *ctx, fz_document *doc)
{
if (fz_drop_imp(ctx, doc, &doc->refs))
+ {
if (doc->drop_document)
doc->drop_document(ctx, doc);
+ fz_free(ctx, doc);
+ }
}
static void