diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2018-01-31 18:31:07 +0100 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2018-02-01 17:21:16 +0100 |
commit | 4ccc9cdc72346175fd22aafbce03847f1e287d26 (patch) | |
tree | 6e6c81d3d4b38ff10cc7ea4f51301cb9b41beeca /source/fitz/load-jpeg.c | |
parent | aa188d02031df0c96e785d4ea0ef0f95599827d1 (diff) | |
download | mupdf-4ccc9cdc72346175fd22aafbce03847f1e287d26.tar.xz |
Drop JPEG/J2K/JPEG-XR/PNG/TIFF colorspaces even upon exception.
For TIFF it was not just the colorspace, but other data as well.
Diffstat (limited to 'source/fitz/load-jpeg.c')
-rw-r--r-- | source/fitz/load-jpeg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/fitz/load-jpeg.c b/source/fitz/load-jpeg.c index b088325b..87b32431 100644 --- a/source/fitz/load-jpeg.c +++ b/source/fitz/load-jpeg.c @@ -379,7 +379,7 @@ fz_load_jpeg_info(fz_context *ctx, const unsigned char *rbuf, size_t rlen, int * struct jpeg_decompress_struct cinfo; struct jpeg_error_mgr err; struct jpeg_source_mgr src; - fz_colorspace *icc; + fz_colorspace *icc = NULL; fz_try(ctx) { @@ -453,6 +453,7 @@ fz_load_jpeg_info(fz_context *ctx, const unsigned char *rbuf, size_t rlen, int * } fz_catch(ctx) { + fz_drop_colorspace(ctx, icc); fz_rethrow(ctx); } } |