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

libtiff/tif_jpeg.c:758:1: start of procedure JPEGFixupTagsSubsampling()
756. #ifdef CHECK_JPEG_YCBCR_SUBSAMPLING
757. 
758. static void
     ^
759. JPEGFixupTagsSubsampling(TIFF* tif)
760. {

libtiff/tif_jpeg.c:781:2: 
779. 	 * Joris Van Damme, May 2007
780. 	 */
781. 	static const char module[] = "JPEGFixupTagsSubsampling";
      ^
782. 	struct JPEGFixupTagsSubsamplingData m;
783. 

libtiff/tif_jpeg.c:784:9: 
782. 	struct JPEGFixupTagsSubsamplingData m;
783. 
784.         _TIFFFillStriles( tif );
             ^
785.         
786.         if( tif->tif_dir.td_stripbytecount == NULL

libtiff/tif_dirread.c:5739:1: start of procedure _TIFFFillStriles()
  5737. }
  5738. 
  5739. int _TIFFFillStriles( TIFF *tif )
        ^
  5740. {
  5741.     return _TIFFFillStrilesInternal( tif, 1 );

libtiff/tif_dirread.c:5741:5: 
  5739. int _TIFFFillStriles( TIFF *tif )
  5740. {
  5741.     return _TIFFFillStrilesInternal( tif, 1 );
            ^
  5742. }
  5743. 

libtiff/tif_dirread.c:5744:1: start of procedure _TIFFFillStrilesInternal()
    5742. }
    5743. 
    5744. static int _TIFFFillStrilesInternal( TIFF *tif, int loadStripByteCount )
          ^
    5745. {
    5746. #if defined(DEFER_STRILE_LOAD)

libtiff/tif_dirread.c:5787:9: 
    5785.         return return_value;
    5786. #else /* !defined(DEFER_STRILE_LOAD) */
    5787.         (void) tif;
                  ^
    5788.         (void) loadStripByteCount;
    5789.         return 1;

libtiff/tif_dirread.c:5788:9: 
    5786. #else /* !defined(DEFER_STRILE_LOAD) */
    5787.         (void) tif;
    5788.         (void) loadStripByteCount;
                  ^
    5789.         return 1;
    5790. #endif 

libtiff/tif_dirread.c:5789:9: 
    5787.         (void) tif;
    5788.         (void) loadStripByteCount;
    5789.         return 1;
                  ^
    5790. #endif 
    5791. }

libtiff/tif_dirread.c:5791:1: return from a call to _TIFFFillStrilesInternal
    5789.         return 1;
    5790. #endif 
    5791. }
          ^
    5792. 
    5793. 

libtiff/tif_dirread.c:5742:1: return from a call to _TIFFFillStriles
  5740. {
  5741.     return _TIFFFillStrilesInternal( tif, 1 );
  5742. }
        ^
  5743. 
  5744. static int _TIFFFillStrilesInternal( TIFF *tif, int loadStripByteCount )

libtiff/tif_jpeg.c:786:13: Taking false branch
784.         _TIFFFillStriles( tif );
785.         
786.         if( tif->tif_dir.td_stripbytecount == NULL
                 ^
787.             || tif->tif_dir.td_stripoffset == NULL
788.             || tif->tif_dir.td_stripbytecount[0] == 0 )

libtiff/tif_jpeg.c:787:16: Taking false branch
785.         
786.         if( tif->tif_dir.td_stripbytecount == NULL
787.             || tif->tif_dir.td_stripoffset == NULL
                    ^
788.             || tif->tif_dir.td_stripbytecount[0] == 0 )
789.         {

libtiff/tif_jpeg.c:788:16: Taking false branch
786.         if( tif->tif_dir.td_stripbytecount == NULL
787.             || tif->tif_dir.td_stripoffset == NULL
788.             || tif->tif_dir.td_stripbytecount[0] == 0 )
                    ^
789.         {
790.             /* Do not even try to check if the first strip/tile does not

libtiff/tif_jpeg.c:796:2: 
794.         }
795. 
796. 	m.tif=tif;
      ^
797. 	m.buffersize=2048;
798. 	m.buffer=_TIFFmalloc(m.buffersize);

libtiff/tif_jpeg.c:797:2: 
795. 
796. 	m.tif=tif;
797. 	m.buffersize=2048;
      ^
798. 	m.buffer=_TIFFmalloc(m.buffersize);
799. 	if (m.buffer==NULL)

libtiff/tif_jpeg.c:798:2: 
796. 	m.tif=tif;
797. 	m.buffersize=2048;
798. 	m.buffer=_TIFFmalloc(m.buffersize);
      ^
799. 	if (m.buffer==NULL)
800. 	{

libtiff/tif_unix.c:308:1: start of procedure _TIFFmalloc()
  306. #endif
  307. 
  308. void*
       ^
  309. _TIFFmalloc(tmsize_t s)
  310. {

libtiff/tif_unix.c:311:13: Taking false branch
  309. _TIFFmalloc(tmsize_t s)
  310. {
  311.         if (s == 0)
                   ^
  312.                 return ((void *) NULL);
  313. 

libtiff/tif_unix.c:314:2: 
  312.                 return ((void *) NULL);
  313. 
  314. 	return (malloc((size_t) s));
        ^
  315. }
  316. 

libtiff/tif_unix.c:315:1: return from a call to _TIFFmalloc
  313. 
  314. 	return (malloc((size_t) s));
  315. }
       ^
  316. 
  317. void* _TIFFcalloc(tmsize_t nmemb, tmsize_t siz)

libtiff/tif_jpeg.c:799:6: Taking false branch
797. 	m.buffersize=2048;
798. 	m.buffer=_TIFFmalloc(m.buffersize);
799. 	if (m.buffer==NULL)
          ^
800. 	{
801. 		TIFFWarningExt(tif->tif_clientdata,module,

libtiff/tif_jpeg.c:805:2: 
803. 		return;
804. 	}
805. 	m.buffercurrentbyte=NULL;
      ^
806. 	m.bufferbytesleft=0;
807. 	m.fileoffset=tif->tif_dir.td_stripoffset[0];

libtiff/tif_jpeg.c:806:2: 
804. 	}
805. 	m.buffercurrentbyte=NULL;
806. 	m.bufferbytesleft=0;
      ^
807. 	m.fileoffset=tif->tif_dir.td_stripoffset[0];
808. 	m.filepositioned=0;

libtiff/tif_jpeg.c:807:2: 
805. 	m.buffercurrentbyte=NULL;
806. 	m.bufferbytesleft=0;
807. 	m.fileoffset=tif->tif_dir.td_stripoffset[0];
      ^
808. 	m.filepositioned=0;
809. 	m.filebytesleft=tif->tif_dir.td_stripbytecount[0];

libtiff/tif_jpeg.c:808:2: 
806. 	m.bufferbytesleft=0;
807. 	m.fileoffset=tif->tif_dir.td_stripoffset[0];
808. 	m.filepositioned=0;
      ^
809. 	m.filebytesleft=tif->tif_dir.td_stripbytecount[0];
810. 	if (!JPEGFixupTagsSubsamplingSec(&m))

libtiff/tif_jpeg.c:809:2: 
807. 	m.fileoffset=tif->tif_dir.td_stripoffset[0];
808. 	m.filepositioned=0;
809. 	m.filebytesleft=tif->tif_dir.td_stripbytecount[0];
      ^
810. 	if (!JPEGFixupTagsSubsamplingSec(&m))
811. 		TIFFWarningExt(tif->tif_clientdata,module,

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