summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-08-12 22:51:09 +0200
committerEven Rouault <even.rouault@spatialys.com>2019-08-12 22:51:09 +0200
commit12768a24b19b9fe6746f9545c9d77bff1e306db4 (patch)
tree94969daedf57ace61d60f1f56f3b5335c402ed03
parentea69462ea25a00afd18df34c36cb7c487e1e0628 (diff)
downloadlibtiff-git-12768a24b19b9fe6746f9545c9d77bff1e306db4.tar.gz
TIFFClientOpen(): fix memory leak if one of the required callbacks is not provided. Fixed Coverity GDAL CID 1404110
-rw-r--r--libtiff/tif_open.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libtiff/tif_open.c b/libtiff/tif_open.c
index f7b7e0f8..3cb53d4e 100644
--- a/libtiff/tif_open.c
+++ b/libtiff/tif_open.c
@@ -131,6 +131,7 @@ TIFFClientOpen(
if (!readproc || !writeproc || !seekproc || !closeproc || !sizeproc) {
TIFFErrorExt(clientdata, module,
"One of the client procedures is NULL pointer.");
+ _TIFFfree(tif);
goto bad2;
}
tif->tif_readproc = readproc;