TIFFClientOpen(): fix memory leak if one of the required callbacks is not provided. Fixed Coverity GDAL CID 1404110

This commit is contained in:
Even Rouault 2019-08-12 22:51:09 +02:00
parent ea69462ea2
commit 12768a24b1
No known key found for this signature in database
GPG Key ID: 33EBBFC47B3DD87D

View File

@ -131,6 +131,7 @@ TIFFClientOpen(
if (!readproc || !writeproc || !seekproc || !closeproc || !sizeproc) { if (!readproc || !writeproc || !seekproc || !closeproc || !sizeproc) {
TIFFErrorExt(clientdata, module, TIFFErrorExt(clientdata, module,
"One of the client procedures is NULL pointer."); "One of the client procedures is NULL pointer.");
_TIFFfree(tif);
goto bad2; goto bad2;
} }
tif->tif_readproc = readproc; tif->tif_readproc = readproc;