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

libtiff/tif_ojpeg.c:1740:1: start of procedure OJPEGReadHeaderInfoSecTablesQTable()
1738. }
1739. 
1740. static int
      ^
1741. OJPEGReadHeaderInfoSecTablesQTable(TIFF* tif)
1742. {

libtiff/tif_ojpeg.c:1743:2: 
1741. OJPEGReadHeaderInfoSecTablesQTable(TIFF* tif)
1742. {
1743. 	static const char module[]="OJPEGReadHeaderInfoSecTablesQTable";
       ^
1744. 	OJPEGState* sp=(OJPEGState*)tif->tif_data;
1745. 	uint8 m;

libtiff/tif_ojpeg.c:1744:2: 
1742. {
1743. 	static const char module[]="OJPEGReadHeaderInfoSecTablesQTable";
1744. 	OJPEGState* sp=(OJPEGState*)tif->tif_data;
       ^
1745. 	uint8 m;
1746. 	uint8 n;

libtiff/tif_ojpeg.c:1750:6: Taking false branch
1748. 	uint8* ob;
1749. 	uint32 p;
1750. 	if (sp->qtable_offset[0]==0)
           ^
1751. 	{
1752. 		TIFFErrorExt(tif->tif_clientdata,module,"Missing JPEG tables");

libtiff/tif_ojpeg.c:1755:2: 
1753. 		return(0);
1754. 	}
1755. 	sp->in_buffer_file_pos_log=0;
       ^
1756. 	for (m=0; m<sp->samples_per_pixel; m++)
1757. 	{

libtiff/tif_ojpeg.c:1756:7: 
1754. 	}
1755. 	sp->in_buffer_file_pos_log=0;
1756. 	for (m=0; m<sp->samples_per_pixel; m++)
            ^
1757. 	{
1758. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))

libtiff/tif_ojpeg.c:1756:12: Loop condition is true. Entering loop body
1754. 	}
1755. 	sp->in_buffer_file_pos_log=0;
1756. 	for (m=0; m<sp->samples_per_pixel; m++)
                 ^
1757. 	{
1758. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))

libtiff/tif_ojpeg.c:1758:8: Taking true branch
1756. 	for (m=0; m<sp->samples_per_pixel; m++)
1757. 	{
1758. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))
             ^
1759. 		{
1760. 			for (n=0; n<m-1; n++)

libtiff/tif_ojpeg.c:1758:38: Taking true branch
1756. 	for (m=0; m<sp->samples_per_pixel; m++)
1757. 	{
1758. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))
                                           ^
1759. 		{
1760. 			for (n=0; n<m-1; n++)

libtiff/tif_ojpeg.c:1760:9: 
1758. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))
1759. 		{
1760. 			for (n=0; n<m-1; n++)
              ^
1761. 			{
1762. 				if (sp->qtable_offset[m]==sp->qtable_offset[n])

libtiff/tif_ojpeg.c:1760:14: Loop condition is false. Leaving loop
1758. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))
1759. 		{
1760. 			for (n=0; n<m-1; n++)
                   ^
1761. 			{
1762. 				if (sp->qtable_offset[m]==sp->qtable_offset[n])

libtiff/tif_ojpeg.c:1768:4: 
1766. 				}
1767. 			}
1768. 			oa=sizeof(uint32)+69;
         ^
1769. 			ob=_TIFFmalloc(oa);
1770. 			if (ob==0)

libtiff/tif_ojpeg.c:1769:4: 
1767. 			}
1768. 			oa=sizeof(uint32)+69;
1769. 			ob=_TIFFmalloc(oa);
         ^
1770. 			if (ob==0)
1771. 			{

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

libtiff/tif_ojpeg.c:1775:4: 
1773. 				return(0);
1774. 			}
1775. 			*(uint32*)ob=oa;
         ^
1776. 			ob[sizeof(uint32)]=255;
1777. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;

libtiff/tif_ojpeg.c:1776:4: 
1774. 			}
1775. 			*(uint32*)ob=oa;
1776. 			ob[sizeof(uint32)]=255;
         ^
1777. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;
1778. 			ob[sizeof(uint32)+2]=0;

libtiff/tif_ojpeg.c:1777:4: 
1775. 			*(uint32*)ob=oa;
1776. 			ob[sizeof(uint32)]=255;
1777. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;
         ^
1778. 			ob[sizeof(uint32)+2]=0;
1779. 			ob[sizeof(uint32)+3]=67;

libtiff/tif_ojpeg.c:1778:4: 
1776. 			ob[sizeof(uint32)]=255;
1777. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;
1778. 			ob[sizeof(uint32)+2]=0;
         ^
1779. 			ob[sizeof(uint32)+3]=67;
1780. 			ob[sizeof(uint32)+4]=m;

libtiff/tif_ojpeg.c:1779:4: 
1777. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;
1778. 			ob[sizeof(uint32)+2]=0;
1779. 			ob[sizeof(uint32)+3]=67;
         ^
1780. 			ob[sizeof(uint32)+4]=m;
1781. 			TIFFSeekFile(tif,sp->qtable_offset[m],SEEK_SET); 

libtiff/tif_ojpeg.c:1780:4: 
1778. 			ob[sizeof(uint32)+2]=0;
1779. 			ob[sizeof(uint32)+3]=67;
1780. 			ob[sizeof(uint32)+4]=m;
         ^
1781. 			TIFFSeekFile(tif,sp->qtable_offset[m],SEEK_SET); 
1782. 			p=TIFFReadFile(tif,&ob[sizeof(uint32)+5],64);

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

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

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

libtiff/tif_ojpeg.c:1784:5: 
1782. 			p=TIFFReadFile(tif,&ob[sizeof(uint32)+5],64);
1783. 			if (p!=64)
1784. 				return(0);
          ^
1785. 			sp->qtable[m]=ob;
1786. 			sp->sof_tq[m]=m;
