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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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