From 91ac75c660d7d7100e4c55d63cbbd27729da351b Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Tue, 11 Oct 2016 21:00:24 +0800 Subject: Always call fz_drop_document() to drop the document. --- source/cbz/mucbz.c | 2 +- source/cbz/mutiff.c | 2 +- source/gprf/gprf-doc.c | 2 +- source/html/epub-doc.c | 2 +- source/pdf/pdf-xref.c | 4 ++-- source/xps/xps-zip.c | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/cbz/mucbz.c b/source/cbz/mucbz.c index 23143fac..9fa522c8 100644 --- a/source/cbz/mucbz.c +++ b/source/cbz/mucbz.c @@ -213,7 +213,7 @@ cbz_open_document_with_stream(fz_context *ctx, fz_stream *file) } fz_catch(ctx) { - cbz_drop_document(ctx, doc); + fz_drop_document(ctx, &doc->super); fz_rethrow(ctx); } return doc; diff --git a/source/cbz/mutiff.c b/source/cbz/mutiff.c index fb88e11b..7817eb16 100644 --- a/source/cbz/mutiff.c +++ b/source/cbz/mutiff.c @@ -132,7 +132,7 @@ tiff_open_document_with_stream(fz_context *ctx, fz_stream *file) } fz_catch(ctx) { - tiff_drop_document(ctx, doc); + fz_drop_document(ctx, &doc->super); fz_rethrow(ctx); } diff --git a/source/gprf/gprf-doc.c b/source/gprf/gprf-doc.c index e269229e..8d6b3b32 100644 --- a/source/gprf/gprf-doc.c +++ b/source/gprf/gprf-doc.c @@ -965,7 +965,7 @@ gprf_open_document_with_stream(fz_context *ctx, fz_stream *file) } fz_catch(ctx) { - gprf_close_document(ctx, (fz_document*)doc); + fz_drop_document(ctx, &doc->super); fz_rethrow(ctx); } diff --git a/source/html/epub-doc.c b/source/html/epub-doc.c index efa43075..d9b0a0c9 100644 --- a/source/html/epub-doc.c +++ b/source/html/epub-doc.c @@ -463,7 +463,7 @@ epub_init(fz_context *ctx, fz_archive *zip) } fz_catch(ctx) { - epub_drop_document(ctx, (fz_document*)doc); + fz_drop_document(ctx, &doc->super); fz_rethrow(ctx); } diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c index a1e2f88d..a054a837 100644 --- a/source/pdf/pdf-xref.c +++ b/source/pdf/pdf-xref.c @@ -2373,7 +2373,7 @@ pdf_open_document_with_stream(fz_context *ctx, fz_stream *file) } fz_catch(ctx) { - pdf_drop_document_imp(ctx, doc); + fz_drop_document(ctx, &doc->super); fz_rethrow(ctx); } return doc; @@ -2400,7 +2400,7 @@ pdf_open_document(fz_context *ctx, const char *filename) } fz_catch(ctx) { - pdf_drop_document_imp(ctx, doc); + fz_drop_document(ctx, &doc->super); fz_rethrow(ctx); } return doc; diff --git a/source/xps/xps-zip.c b/source/xps/xps-zip.c index 1d8f5bc8..6874a3b4 100644 --- a/source/xps/xps-zip.c +++ b/source/xps/xps-zip.c @@ -134,7 +134,7 @@ xps_open_document_with_directory(fz_context *ctx, const char *directory) } fz_catch(ctx) { - xps_drop_document(ctx, doc); + fz_drop_document(ctx, &doc->super); fz_rethrow(ctx); } @@ -156,7 +156,7 @@ xps_open_document_with_stream(fz_context *ctx, fz_stream *file) } fz_catch(ctx) { - xps_drop_document(ctx, doc); + fz_drop_document(ctx, &doc->super); fz_rethrow(ctx); } -- cgit v1.2.3