summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2012-08-05 15:12:03 +0200
committerSebastian Rasmussen <sebras@gmail.com>2012-08-06 13:59:50 +0200
commit0a19ed89da833569e014a05e2077a0819a91e5aa (patch)
treea00b60ffeefd52c7b7a11a17e9f49eb040712387
parentd4285dea2ccad65678bca52af003860f20b14b63 (diff)
downloadmupdf-0a19ed89da833569e014a05e2077a0819a91e5aa.tar.xz
Make sure images are freed upon loading error
There was a call to fz_drop_image() in the error handling code, however the fz_storable freeing function was not yet set which meant that the image was not freed. Instead call pdf_free_image() to free the image.
-rw-r--r--pdf/pdf_image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pdf/pdf_image.c b/pdf/pdf_image.c
index 58a17ed0..873aeb08 100644
--- a/pdf/pdf_image.c
+++ b/pdf/pdf_image.c
@@ -456,7 +456,7 @@ pdf_load_image_imp(pdf_document *xref, pdf_obj *rdb, pdf_obj *dict, fz_stream *c
}
fz_catch(ctx)
{
- fz_drop_image(ctx, &image->base);
+ pdf_free_image(ctx, (fz_storable *) image);
fz_rethrow(ctx);
}
return image;