From 3f74fb638182f6fa14c7d7bea970e4837be629da Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Wed, 14 Mar 2012 01:05:31 +0000 Subject: Fix memory leak in image_tiff When we have finished replacing tiff->samples, free the old samples block. Taken from Sumatra.patch - many thanks. --- fitz/image_tiff.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fitz/image_tiff.c b/fitz/image_tiff.c index ffd0ea88..de4c0732 100644 --- a/fitz/image_tiff.c +++ b/fitz/image_tiff.c @@ -313,6 +313,7 @@ fz_expand_tiff_colormap(struct tiff *tiff) tiff->samplesperpixel += 2; tiff->bitspersample = 8; tiff->stride = stride; + fz_free(tiff->ctx, tiff->samples); tiff->samples = samples; } -- cgit v1.2.3