libtiff/tif_ojpeg.c:1769: error: Memory Leak
  memory dynamically allocated to `return` by call to `_TIFFmalloc()` at line 1754, column 7 is not reachable after line 1769, column 5.

libtiff/tif_ojpeg.c:1725:1: start of procedure OJPEGReadHeaderInfoSecTablesQTable()
1723. }
1724. 
1725. static int
      ^
1726. OJPEGReadHeaderInfoSecTablesQTable(TIFF* tif)
1727. {

libtiff/tif_ojpeg.c:1728:2: 
1726. OJPEGReadHeaderInfoSecTablesQTable(TIFF* tif)
1727. {
1728. 	static const char module[]="OJPEGReadHeaderInfoSecTablesQTable";
       ^
1729. 	OJPEGState* sp=(OJPEGState*)tif->tif_data;
1730. 	uint8 m;

libtiff/tif_ojpeg.c:1729:2: 
1727. {
1728. 	static const char module[]="OJPEGReadHeaderInfoSecTablesQTable";
1729. 	OJPEGState* sp=(OJPEGState*)tif->tif_data;
       ^
1730. 	uint8 m;
1731. 	uint8 n;

libtiff/tif_ojpeg.c:1735:6: Taking false branch
1733. 	uint8* ob;
1734. 	uint32 p;
1735. 	if (sp->qtable_offset[0]==0)
           ^
1736. 	{
1737. 		TIFFErrorExt(tif->tif_clientdata,module,"Missing JPEG tables");

libtiff/tif_ojpeg.c:1740:2: 
1738. 		return(0);
1739. 	}
1740. 	sp->in_buffer_file_pos_log=0;
       ^
1741. 	for (m=0; m<sp->samples_per_pixel; m++)
1742. 	{

libtiff/tif_ojpeg.c:1741:7: 
1739. 	}
1740. 	sp->in_buffer_file_pos_log=0;
1741. 	for (m=0; m<sp->samples_per_pixel; m++)
            ^
1742. 	{
1743. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))

libtiff/tif_ojpeg.c:1741:12: Loop condition is true. Entering loop body
1739. 	}
1740. 	sp->in_buffer_file_pos_log=0;
1741. 	for (m=0; m<sp->samples_per_pixel; m++)
                 ^
1742. 	{
1743. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))

libtiff/tif_ojpeg.c:1743:8: Taking true branch
1741. 	for (m=0; m<sp->samples_per_pixel; m++)
1742. 	{
1743. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))
             ^
1744. 		{
1745. 			for (n=0; n<m-1; n++)

libtiff/tif_ojpeg.c:1743:38: Taking true branch
1741. 	for (m=0; m<sp->samples_per_pixel; m++)
1742. 	{
1743. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))
                                           ^
1744. 		{
1745. 			for (n=0; n<m-1; n++)

libtiff/tif_ojpeg.c:1745:9: 
1743. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))
1744. 		{
1745. 			for (n=0; n<m-1; n++)
              ^
1746. 			{
1747. 				if (sp->qtable_offset[m]==sp->qtable_offset[n])

libtiff/tif_ojpeg.c:1745:14: Loop condition is false. Leaving loop
1743. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))
1744. 		{
1745. 			for (n=0; n<m-1; n++)
                   ^
1746. 			{
1747. 				if (sp->qtable_offset[m]==sp->qtable_offset[n])

libtiff/tif_ojpeg.c:1753:4: 
1751. 				}
1752. 			}
1753. 			oa=sizeof(uint32)+69;
         ^
1754. 			ob=_TIFFmalloc(oa);
1755. 			if (ob==0)

libtiff/tif_ojpeg.c:1754:4: 
1752. 			}
1753. 			oa=sizeof(uint32)+69;
1754. 			ob=_TIFFmalloc(oa);
         ^
1755. 			if (ob==0)
1756. 			{

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_ojpeg.c:1755:8: Taking false branch
1753. 			oa=sizeof(uint32)+69;
1754. 			ob=_TIFFmalloc(oa);
1755. 			if (ob==0)
             ^
1756. 			{
1757. 				TIFFErrorExt(tif->tif_clientdata,module,"Out of memory");

libtiff/tif_ojpeg.c:1760:4: 
1758. 				return(0);
1759. 			}
1760. 			*(uint32*)ob=oa;
         ^
1761. 			ob[sizeof(uint32)]=255;
1762. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;

libtiff/tif_ojpeg.c:1761:4: 
1759. 			}
1760. 			*(uint32*)ob=oa;
1761. 			ob[sizeof(uint32)]=255;
         ^
1762. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;
1763. 			ob[sizeof(uint32)+2]=0;

libtiff/tif_ojpeg.c:1762:4: 
1760. 			*(uint32*)ob=oa;
1761. 			ob[sizeof(uint32)]=255;
1762. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;
         ^
1763. 			ob[sizeof(uint32)+2]=0;
1764. 			ob[sizeof(uint32)+3]=67;

libtiff/tif_ojpeg.c:1763:4: 
1761. 			ob[sizeof(uint32)]=255;
1762. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;
1763. 			ob[sizeof(uint32)+2]=0;
         ^
1764. 			ob[sizeof(uint32)+3]=67;
1765. 			ob[sizeof(uint32)+4]=m;

libtiff/tif_ojpeg.c:1764:4: 
1762. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;
1763. 			ob[sizeof(uint32)+2]=0;
1764. 			ob[sizeof(uint32)+3]=67;
         ^
1765. 			ob[sizeof(uint32)+4]=m;
1766. 			TIFFSeekFile(tif,sp->qtable_offset[m],SEEK_SET); 

libtiff/tif_ojpeg.c:1765:4: 
1763. 			ob[sizeof(uint32)+2]=0;
1764. 			ob[sizeof(uint32)+3]=67;
1765. 			ob[sizeof(uint32)+4]=m;
         ^
1766. 			TIFFSeekFile(tif,sp->qtable_offset[m],SEEK_SET); 
1767. 			p=TIFFReadFile(tif,&ob[sizeof(uint32)+5],64);

libtiff/tif_ojpeg.c:1766:4: Skipping __function_pointer__(): unresolved function pointer
1764. 			ob[sizeof(uint32)+3]=67;
1765. 			ob[sizeof(uint32)+4]=m;
1766. 			TIFFSeekFile(tif,sp->qtable_offset[m],SEEK_SET); 
         ^
1767. 			p=TIFFReadFile(tif,&ob[sizeof(uint32)+5],64);
1768. 			if (p!=64)

libtiff/tif_ojpeg.c:1767:4: Skipping __function_pointer__(): unresolved function pointer
1765. 			ob[sizeof(uint32)+4]=m;
1766. 			TIFFSeekFile(tif,sp->qtable_offset[m],SEEK_SET); 
1767. 			p=TIFFReadFile(tif,&ob[sizeof(uint32)+5],64);
         ^
1768. 			if (p!=64)
1769. 				return(0);

libtiff/tif_ojpeg.c:1768:8: Taking true branch
1766. 			TIFFSeekFile(tif,sp->qtable_offset[m],SEEK_SET); 
1767. 			p=TIFFReadFile(tif,&ob[sizeof(uint32)+5],64);
1768. 			if (p!=64)
             ^
1769. 				return(0);
1770. 			sp->qtable[m]=ob;

libtiff/tif_ojpeg.c:1769:5: 
1767. 			p=TIFFReadFile(tif,&ob[sizeof(uint32)+5],64);
1768. 			if (p!=64)
1769. 				return(0);
          ^
1770. 			sp->qtable[m]=ob;
1771. 			sp->sof_tq[m]=m;
