summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2017-06-07 08:04:33 +0800
committerRobin Watts <robin.watts@artifex.com>2017-06-08 16:54:08 +0100
commit39d641015af4b1fd63cc8bf05289b4aec7cfd3ed (patch)
tree5880f5101fe98b09cc24ab736af3eecd1d5d7767 /source/fitz
parentfb11d33b1c6592ba72651310e57ac82d62e30ffe (diff)
downloadmupdf-39d641015af4b1fd63cc8bf05289b4aec7cfd3ed.tar.xz
Plug leak of opj decoder in case of fz_new_pixmap() throwing.
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/load-jpx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c
index 2110299c..eafdd33a 100644
--- a/source/fitz/load-jpx.c
+++ b/source/fitz/load-jpx.c
@@ -808,11 +808,11 @@ jpx_read_image(fz_context *ctx, fz_jpxd *state, unsigned char *data, size_t size
return NULL;
}
- a = !!a; /* ignore any superfluous alpha channels */
- img = fz_new_pixmap(ctx, state->cs, w, h, a);
-
fz_try(ctx)
{
+ a = !!a; /* ignore any superfluous alpha channels */
+ img = fz_new_pixmap(ctx, state->cs, w, h, a);
+
p = img->samples;
if (upsample_required)
{