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

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

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

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

libtiff/tif_dirread.c:5585:1: start of procedure _TIFFFillStriles()
  5583. }
  5584. 
  5585. int _TIFFFillStriles( TIFF *tif )
        ^
  5586. {
  5587. #if defined(DEFER_STRILE_LOAD)

libtiff/tif_dirread.c:5627:9: 
  5625.         return return_value;
  5626. #else /* !defined(DEFER_STRILE_LOAD) */
  5627.         (void) tif;
                ^
  5628.         return 1;
  5629. #endif 

libtiff/tif_dirread.c:5628:9: 
  5626. #else /* !defined(DEFER_STRILE_LOAD) */
  5627.         (void) tif;
  5628.         return 1;
                ^
  5629. #endif 
  5630. }

libtiff/tif_dirread.c:5630:1: return from a call to _TIFFFillStriles
  5628.         return 1;
  5629. #endif 
  5630. }
        ^
  5631. 
  5632. 

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

libtiff/tif_jpeg.c:734:16: Taking false branch
732.         
733.         if( tif->tif_dir.td_stripbytecount == NULL
734.             || tif->tif_dir.td_stripoffset == NULL
                    ^
735.             || tif->tif_dir.td_stripbytecount[0] == 0 )
736.         {

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

libtiff/tif_jpeg.c:743:2: 
741.         }
742. 
743. 	m.tif=tif;
      ^
744. 	m.buffersize=2048;
745. 	m.buffer=_TIFFmalloc(m.buffersize);

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

libtiff/tif_jpeg.c:745:2: 
743. 	m.tif=tif;
744. 	m.buffersize=2048;
745. 	m.buffer=_TIFFmalloc(m.buffersize);
      ^
746. 	if (m.buffer==NULL)
747. 	{

libtiff/tif_unix.c:257:1: start of procedure _TIFFmalloc()
  255. #endif
  256. 
  257. void*
       ^
  258. _TIFFmalloc(tmsize_t s)
  259. {

libtiff/tif_unix.c:260:13: Taking false branch
  258. _TIFFmalloc(tmsize_t s)
  259. {
  260.         if (s == 0)
                   ^
  261.                 return ((void *) NULL);
  262. 

libtiff/tif_unix.c:263:2: 
  261.                 return ((void *) NULL);
  262. 
  263. 	return (malloc((size_t) s));
        ^
  264. }
  265. 

libtiff/tif_unix.c:264:1: return from a call to _TIFFmalloc
  262. 
  263. 	return (malloc((size_t) s));
  264. }
       ^
  265. 
  266. void

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

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

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

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

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

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

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