From 97ed644e720a70f46d9100cc9b493d70169bc454 Mon Sep 17 00:00:00 2001 From: Andrey Kiselev Date: Thu, 3 Jul 2003 12:27:17 +0000 Subject: [PATCH] Memory leak fixed as reported by Robert S. Kissel. --- tools/thumbnail.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/thumbnail.c b/tools/thumbnail.c index 7026b0af..775efbba 100644 --- a/tools/thumbnail.c +++ b/tools/thumbnail.c @@ -1,4 +1,4 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/tools/thumbnail.c,v 1.3 2003-03-12 14:05:06 dron Exp $ */ +/* $Header: /cvs/maptools/cvsroot/libtiff/tools/thumbnail.c,v 1.4 2003-07-03 12:27:17 dron Exp $ */ /* * Copyright (c) 1994-1997 Sam Leffler @@ -298,7 +298,7 @@ static uint16 stepDstWidth; /* dest stepping width */ static uint8* src0; /* horizontal bit stepping (start) */ static uint8* src1; /* horizontal bit stepping (middle) */ static uint8* src2; /* horizontal bit stepping (end) */ -static uint16* rowoff; /* row offset for stepping */ +static uint16* rowoff; /* row offset for stepping */ static uint8 cmap[256]; /* colormap indexes */ static uint8 bits[256]; /* count of bits set */ @@ -523,6 +523,7 @@ generateThumbnail(TIFF* in, TIFF* out) TIFFGetField(in, TIFFTAG_PHOTOMETRIC, &photometric); setupCmap(); setImage(raster, sw, sh); + _TIFFfree(raster); TIFFSetField(out, TIFFTAG_SUBFILETYPE, FILETYPE_REDUCEDIMAGE); TIFFSetField(out, TIFFTAG_IMAGEWIDTH, (uint32) tnw);