diff options
author | erouault <erouault> | 2016-11-18 14:58:46 +0000 |
---|---|---|
committer | erouault <erouault> | 2016-11-18 14:58:46 +0000 |
commit | 1b972233b555a2c2805153d4b4127d715b76ec44 (patch) | |
tree | 00f33ee5251b77799aba7d223d5fd474f206b909 /tools | |
parent | 243c9a5588206f1809eca701374a392077e68c15 (diff) | |
download | libtiff-1b972233b555a2c2805153d4b4127d715b76ec44.tar.gz |
* tools/tiffcrop.c: Fix memory leak in (recent) error code path.
Fixes Coverity 1394415.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tiffcrop.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c index eb3d2d49..722b132c 100644 --- a/tools/tiffcrop.c +++ b/tools/tiffcrop.c @@ -1,4 +1,4 @@ -/* $Id: tiffcrop.c,v 1.45 2016-11-12 19:57:16 bfriesen Exp $ */ +/* $Id: tiffcrop.c,v 1.46 2016-11-18 14:58:46 erouault Exp $ */ /* tiffcrop.c -- a port of tiffcp.c extended to include manipulations of * the image data through additional options listed below @@ -1349,6 +1349,7 @@ static int writeBufferToSeparateTiles (TIFF* out, uint8* buf, uint32 imagelength { TIFFError(TIFFFileName(out), "Error, uint32 overflow when computing (imagewidth * bps * spp) + 7"); + _TIFFfree(obuf); return 1; } src_rowsize = ((imagewidth * spp * bps) + 7U) / 8; |