summaryrefslogtreecommitdiff
path: root/third_party/libtiff/tif_predict.c
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/libtiff/tif_predict.c')
-rw-r--r--third_party/libtiff/tif_predict.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/third_party/libtiff/tif_predict.c b/third_party/libtiff/tif_predict.c
index 1388dde59c..8975672aec 100644
--- a/third_party/libtiff/tif_predict.c
+++ b/third_party/libtiff/tif_predict.c
@@ -109,7 +109,10 @@ PredictorSetupDecode(TIFF* tif)
TIFFDirectory* td = &tif->tif_dir;
if (!(*sp->setupdecode)(tif) || !PredictorSetup(tif))
+ {
+ (*tif->tif_cleanup)(tif);
return 0;
+ }
if (sp->predictor == 2) {
switch (td->td_bitspersample) {