From f2bc02d1a852d5db4a7b4a91be25c699b60d9c84 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Sat, 29 Oct 2016 23:00:48 +0800 Subject: jpx: Plug pixmap leak in case of error during decoding. --- source/fitz/load-jpx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c index 2469fbc7..b25120be 100644 --- a/source/fitz/load-jpx.c +++ b/source/fitz/load-jpx.c @@ -435,7 +435,6 @@ jpx_read_image(fz_context *ctx, fz_jpxd *state, unsigned char *data, size_t size if (alphas > 0 && prealphas == 0) fz_premultiply_pixmap(ctx, state->pix); } - } } fz_always(ctx) @@ -450,6 +449,7 @@ jpx_read_image(fz_context *ctx, fz_jpxd *state, unsigned char *data, size_t size } fz_catch(ctx) { + fz_drop_pixmap(ctx, state->pix); fz_rethrow(ctx); } -- cgit v1.2.3