libtiff/tif_jpeg.c:754: error: Memory Leak
  memory dynamically allocated by call to `_TIFFmalloc()` at line 742, column 11 is not reachable after line 754, column 7.

libtiff/tif_jpeg.c:703:1: start of procedure JPEGFixupTagsSubsampling()
701. #ifdef CHECK_JPEG_YCBCR_SUBSAMPLING
702. 
703. static void
     ^
704. JPEGFixupTagsSubsampling(TIFF* tif)
705. {

libtiff/tif_jpeg.c:726:2: 
724. 	 * Joris Van Damme, May 2007
725. 	 */
726. 	static const char module[] = "JPEGFixupTagsSubsampling";
      ^
727. 	struct JPEGFixupTagsSubsamplingData m;
728. 

libtiff/tif_jpeg.c:729:9: 
727. 	struct JPEGFixupTagsSubsamplingData m;
728. 
729.         _TIFFFillStriles( tif );
             ^
730.         
731.         if( tif->tif_dir.td_stripbytecount == NULL

libtiff/tif_dirread.c:5523:1: start of procedure _TIFFFillStriles()
  5521. }
  5522. 
  5523. int _TIFFFillStriles( TIFF *tif )
        ^
  5524. {
  5525. #if defined(DEFER_STRILE_LOAD)

libtiff/tif_dirread.c:5565:9: 
  5563.         return return_value;
  5564. #else /* !defined(DEFER_STRILE_LOAD) */
  5565.         (void) tif;
                ^
  5566.         return 1;
  5567. #endif 

libtiff/tif_dirread.c:5566:9: 
  5564. #else /* !defined(DEFER_STRILE_LOAD) */
  5565.         (void) tif;
  5566.         return 1;
                ^
  5567. #endif 
  5568. }

libtiff/tif_dirread.c:5568:1: return from a call to _TIFFFillStriles
  5566.         return 1;
  5567. #endif 
  5568. }
        ^
  5569. 
  5570. 

libtiff/tif_jpeg.c:731:13: Taking false branch
729.         _TIFFFillStriles( tif );
730.         
731.         if( tif->tif_dir.td_stripbytecount == NULL
                 ^
732.             || tif->tif_dir.td_stripbytecount[0] == 0 )
733.         {

libtiff/tif_jpeg.c:732:16: Taking false branch
730.         
731.         if( tif->tif_dir.td_stripbytecount == NULL
732.             || tif->tif_dir.td_stripbytecount[0] == 0 )
                    ^
733.         {
734.             /* Do not even try to check if the first strip/tile does not

libtiff/tif_jpeg.c:740:2: 
738.         }
739. 
740. 	m.tif=tif;
      ^
741. 	m.buffersize=2048;
742. 	m.buffer=_TIFFmalloc(m.buffersize);

libtiff/tif_jpeg.c:741:2: 
739. 
740. 	m.tif=tif;
741. 	m.buffersize=2048;
      ^
742. 	m.buffer=_TIFFmalloc(m.buffersize);
743. 	if (m.buffer==NULL)

libtiff/tif_jpeg.c:742:2: 
740. 	m.tif=tif;
741. 	m.buffersize=2048;
742. 	m.buffer=_TIFFmalloc(m.buffersize);
      ^
743. 	if (m.buffer==NULL)
744. 	{

libtiff/tif_unix.c:253:1: start of procedure _TIFFmalloc()
  251. #endif
  252. 
  253. void*
       ^
  254. _TIFFmalloc(tmsize_t s)
  255. {

libtiff/tif_unix.c:256:2: 
  254. _TIFFmalloc(tmsize_t s)
  255. {
  256. 	return (malloc((size_t) s));
        ^
  257. }
  258. 

libtiff/tif_unix.c:257:1: return from a call to _TIFFmalloc
  255. {
  256. 	return (malloc((size_t) s));
  257. }
       ^
  258. 
  259. void

libtiff/tif_jpeg.c:743:6: Taking false branch
741. 	m.buffersize=2048;
742. 	m.buffer=_TIFFmalloc(m.buffersize);
743. 	if (m.buffer==NULL)
          ^
744. 	{
745. 		TIFFWarningExt(tif->tif_clientdata,module,

libtiff/tif_jpeg.c:749:2: 
747. 		return;
748. 	}
749. 	m.buffercurrentbyte=NULL;
      ^
750. 	m.bufferbytesleft=0;
751. 	m.fileoffset=tif->tif_dir.td_stripoffset[0];

libtiff/tif_jpeg.c:750:2: 
748. 	}
749. 	m.buffercurrentbyte=NULL;
750. 	m.bufferbytesleft=0;
      ^
751. 	m.fileoffset=tif->tif_dir.td_stripoffset[0];
752. 	m.filepositioned=0;

libtiff/tif_jpeg.c:751:2: 
749. 	m.buffercurrentbyte=NULL;
750. 	m.bufferbytesleft=0;
751. 	m.fileoffset=tif->tif_dir.td_stripoffset[0];
      ^
752. 	m.filepositioned=0;
753. 	m.filebytesleft=tif->tif_dir.td_stripbytecount[0];

libtiff/tif_jpeg.c:752:2: 
750. 	m.bufferbytesleft=0;
751. 	m.fileoffset=tif->tif_dir.td_stripoffset[0];
752. 	m.filepositioned=0;
      ^
753. 	m.filebytesleft=tif->tif_dir.td_stripbytecount[0];
754. 	if (!JPEGFixupTagsSubsamplingSec(&m))

libtiff/tif_jpeg.c:753:2: 
751. 	m.fileoffset=tif->tif_dir.td_stripoffset[0];
752. 	m.filepositioned=0;
753. 	m.filebytesleft=tif->tif_dir.td_stripbytecount[0];
      ^
754. 	if (!JPEGFixupTagsSubsamplingSec(&m))
755. 		TIFFWarningExt(tif->tif_clientdata,module,

libtiff/tif_jpeg.c:754:7: Skipping JPEGFixupTagsSubsamplingSec(): empty list of specs
752. 	m.filepositioned=0;
753. 	m.filebytesleft=tif->tif_dir.td_stripbytecount[0];
754. 	if (!JPEGFixupTagsSubsamplingSec(&m))
           ^
755. 		TIFFWarningExt(tif->tif_clientdata,module,
756. 		    "Unable to auto-correct subsampling values, likely corrupt JPEG compressed data in first strip/tile; auto-correcting skipped");
