summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorbfriesen <bfriesen>2015-05-28 13:17:35 +0000
committerbfriesen <bfriesen>2015-05-28 13:17:35 +0000
commit4b7f710adb84c0d9a3c024dd7638187e58141488 (patch)
tree697279f7d2c29fe5e116fd19da513bf3b514a70f /tools
parentfab272bdf91e6c6c80e5349958a100a1cdb90c5f (diff)
downloadlibtiff-4b7f710adb84c0d9a3c024dd7638187e58141488.tar.gz
* tools/tiffcp.c: Fix Coverity 1024306, 1024307, 1024308, 1024309
"Resource leak".
Diffstat (limited to 'tools')
-rw-r--r--tools/tiffcp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/tiffcp.c b/tools/tiffcp.c
index c186b9bd..b4785d72 100644
--- a/tools/tiffcp.c
+++ b/tools/tiffcp.c
@@ -1,4 +1,4 @@
-/* $Id: tiffcp.c,v 1.51 2014-12-21 16:28:37 erouault Exp $ */
+/* $Id: tiffcp.c,v 1.52 2015-05-28 13:17:35 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -1070,7 +1070,7 @@ DECLAREcpFunc(cpContig2SeparateByRow)
inbuf = _TIFFmalloc(scanlinesizein);
outbuf = _TIFFmalloc(scanlinesizeout);
if (!inbuf || !outbuf)
- return 0;
+ goto bad;
_TIFFmemset(inbuf, 0, scanlinesizein);
_TIFFmemset(outbuf, 0, scanlinesizeout);
/* unpack channels */
@@ -1123,7 +1123,7 @@ DECLAREcpFunc(cpSeparate2ContigByRow)
inbuf = _TIFFmalloc(scanlinesizein);
outbuf = _TIFFmalloc(scanlinesizeout);
if (!inbuf || !outbuf)
- return 0;
+ goto bad;
_TIFFmemset(inbuf, 0, scanlinesizein);
_TIFFmemset(outbuf, 0, scanlinesizeout);
for (row = 0; row < imagelength; row++) {