summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/cbz/mucbz.c1
-rw-r--r--source/cbz/muimg.c8
-rw-r--r--source/cbz/mutiff.c1
3 files changed, 3 insertions, 7 deletions
diff --git a/source/cbz/mucbz.c b/source/cbz/mucbz.c
index 8ea782aa..c85cca45 100644
--- a/source/cbz/mucbz.c
+++ b/source/cbz/mucbz.c
@@ -148,7 +148,6 @@ cbz_drop_page_imp(fz_context *ctx, cbz_page *page)
if (!page)
return;
fz_drop_image(ctx, page->image);
- fz_free(ctx, page);
}
static cbz_page *
diff --git a/source/cbz/muimg.c b/source/cbz/muimg.c
index 0680c15a..169fec95 100644
--- a/source/cbz/muimg.c
+++ b/source/cbz/muimg.c
@@ -33,7 +33,7 @@ img_count_pages(fz_context *ctx, img_document *doc)
static fz_rect *
img_bound_page(fz_context *ctx, img_page *page, fz_rect *bbox)
{
- fz_image *image = (fz_image *)page;
+ fz_image *image = page->image;
int xres, yres;
fz_image_get_sanitised_res(image, &xres, &yres);
bbox->x0 = bbox->y0 = 0;
@@ -46,7 +46,7 @@ static void
img_run_page(fz_context *ctx, img_page *page, fz_device *dev, const fz_matrix *ctm, fz_cookie *cookie)
{
fz_matrix local_ctm = *ctm;
- fz_image *image = (fz_image *)page;
+ fz_image *image = page->image;
int xres, yres;
float w, h;
fz_image_get_sanitised_res(image, &xres, &yres);
@@ -127,13 +127,11 @@ img_open_document_with_stream(fz_context *ctx, fz_stream *stm)
}
fz_always(ctx)
{
+ fz_drop_image(ctx, image);
fz_drop_buffer(ctx, buffer);
- fz_drop_stream(ctx, stm);
}
fz_catch(ctx)
- {
fz_rethrow(ctx);
- }
return doc;
}
diff --git a/source/cbz/mutiff.c b/source/cbz/mutiff.c
index c0b9cff0..3a30cc79 100644
--- a/source/cbz/mutiff.c
+++ b/source/cbz/mutiff.c
@@ -52,7 +52,6 @@ tiff_drop_page_imp(fz_context *ctx, tiff_page *page)
if (!page)
return;
fz_drop_image(ctx, page->image);
- fz_free(ctx, page);
}
static tiff_page *