summaryrefslogtreecommitdiff
path: root/source/fitz/load-tiff.c
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2016-10-31 23:50:27 +0800
committerTor Andersson <tor.andersson@artifex.com>2016-11-01 14:02:56 +0100
commita7d88907ee4f2f925459048b728a573c3c0641cf (patch)
tree4ff14f3d37cf69130f7756457b1b0aaaf4b65b33 /source/fitz/load-tiff.c
parent240cf324022eb3e307f0516144096cea3394cc74 (diff)
downloadmupdf-a7d88907ee4f2f925459048b728a573c3c0641cf.tar.xz
tiff: Plug leak where superflous pixmaps was created.
Diffstat (limited to 'source/fitz/load-tiff.c')
-rw-r--r--source/fitz/load-tiff.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/fitz/load-tiff.c b/source/fitz/load-tiff.c
index 3b719f5a..7730010b 100644
--- a/source/fitz/load-tiff.c
+++ b/source/fitz/load-tiff.c
@@ -1288,9 +1288,10 @@ fz_load_tiff_subimage(fz_context *ctx, unsigned char *buf, size_t len, int subim
{
fz_pixmap *rgb = fz_new_pixmap(ctx, fz_device_rgb(ctx), image->w, image->h, 1);
+ fz_var(rgb);
+
fz_try(ctx)
{
- fz_pixmap *rgb = fz_new_pixmap(ctx, fz_device_rgb(ctx), image->w, image->h, 1);
fz_convert_pixmap(ctx, rgb, image);
rgb->xres = image->xres;
rgb->yres = image->yres;