summaryrefslogtreecommitdiff
path: root/third_party/libtiff/0010-fix-leak-imagebegin.patch
blob: 41aaf91a38533cde468cb43ef5199d7f4137868e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/third_party/libtiff/tif_getimage.c b/third_party/libtiff/tif_getimage.c
index 8523793..97fa94d 100644
--- a/third_party/libtiff/tif_getimage.c
+++ b/third_party/libtiff/tif_getimage.c
@@ -478,10 +478,7 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024])
        return 1;
 
   fail_return:
-        _TIFFfree( img->redcmap );
-        _TIFFfree( img->greencmap );
-        _TIFFfree( img->bluecmap );
-        img->redcmap = img->greencmap = img->bluecmap = NULL;
+        TIFFRGBAImageEnd(img);
         return 0;
 }