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

libtiff/tif_ojpeg.c:1735:1: start of procedure OJPEGReadHeaderInfoSecTablesQTable()
1733. }
1734. 
1735. static int
      ^
1736. OJPEGReadHeaderInfoSecTablesQTable(TIFF* tif)
1737. {

libtiff/tif_ojpeg.c:1738:2: 
1736. OJPEGReadHeaderInfoSecTablesQTable(TIFF* tif)
1737. {
1738. 	static const char module[]="OJPEGReadHeaderInfoSecTablesQTable";
       ^
1739. 	OJPEGState* sp=(OJPEGState*)tif->tif_data;
1740. 	uint8 m;

libtiff/tif_ojpeg.c:1739:2: 
1737. {
1738. 	static const char module[]="OJPEGReadHeaderInfoSecTablesQTable";
1739. 	OJPEGState* sp=(OJPEGState*)tif->tif_data;
       ^
1740. 	uint8 m;
1741. 	uint8 n;

libtiff/tif_ojpeg.c:1745:6: Taking false branch
1743. 	uint8* ob;
1744. 	uint32 p;
1745. 	if (sp->qtable_offset[0]==0)
           ^
1746. 	{
1747. 		TIFFErrorExt(tif->tif_clientdata,module,"Missing JPEG tables");

libtiff/tif_ojpeg.c:1750:2: 
1748. 		return(0);
1749. 	}
1750. 	sp->in_buffer_file_pos_log=0;
       ^
1751. 	for (m=0; m<sp->samples_per_pixel; m++)
1752. 	{

libtiff/tif_ojpeg.c:1751:7: 
1749. 	}
1750. 	sp->in_buffer_file_pos_log=0;
1751. 	for (m=0; m<sp->samples_per_pixel; m++)
            ^
1752. 	{
1753. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))

libtiff/tif_ojpeg.c:1751:12: Loop condition is true. Entering loop body
1749. 	}
1750. 	sp->in_buffer_file_pos_log=0;
1751. 	for (m=0; m<sp->samples_per_pixel; m++)
                 ^
1752. 	{
1753. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))

libtiff/tif_ojpeg.c:1753:8: Taking true branch
1751. 	for (m=0; m<sp->samples_per_pixel; m++)
1752. 	{
1753. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))
             ^
1754. 		{
1755. 			for (n=0; n<m-1; n++)

libtiff/tif_ojpeg.c:1753:38: Taking true branch
1751. 	for (m=0; m<sp->samples_per_pixel; m++)
1752. 	{
1753. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))
                                           ^
1754. 		{
1755. 			for (n=0; n<m-1; n++)

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

libtiff/tif_ojpeg.c:1755:14: Loop condition is false. Leaving loop
1753. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))
1754. 		{
1755. 			for (n=0; n<m-1; n++)
                   ^
1756. 			{
1757. 				if (sp->qtable_offset[m]==sp->qtable_offset[n])

libtiff/tif_ojpeg.c:1763:4: 
1761. 				}
1762. 			}
1763. 			oa=sizeof(uint32)+69;
         ^
1764. 			ob=_TIFFmalloc(oa);
1765. 			if (ob==0)

libtiff/tif_ojpeg.c:1764:4: 
1762. 			}
1763. 			oa=sizeof(uint32)+69;
1764. 			ob=_TIFFmalloc(oa);
         ^
1765. 			if (ob==0)
1766. 			{

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:1765:8: Taking false branch
1763. 			oa=sizeof(uint32)+69;
1764. 			ob=_TIFFmalloc(oa);
1765. 			if (ob==0)
             ^
1766. 			{
1767. 				TIFFErrorExt(tif->tif_clientdata,module,"Out of memory");

libtiff/tif_ojpeg.c:1770:4: 
1768. 				return(0);
1769. 			}
1770. 			*(uint32*)ob=oa;
         ^
1771. 			ob[sizeof(uint32)]=255;
1772. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;

libtiff/tif_ojpeg.c:1771:4: 
1769. 			}
1770. 			*(uint32*)ob=oa;
1771. 			ob[sizeof(uint32)]=255;
         ^
1772. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;
1773. 			ob[sizeof(uint32)+2]=0;

libtiff/tif_ojpeg.c:1772:4: 
1770. 			*(uint32*)ob=oa;
1771. 			ob[sizeof(uint32)]=255;
1772. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;
         ^
1773. 			ob[sizeof(uint32)+2]=0;
1774. 			ob[sizeof(uint32)+3]=67;

libtiff/tif_ojpeg.c:1773:4: 
1771. 			ob[sizeof(uint32)]=255;
1772. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;
1773. 			ob[sizeof(uint32)+2]=0;
         ^
1774. 			ob[sizeof(uint32)+3]=67;
1775. 			ob[sizeof(uint32)+4]=m;

libtiff/tif_ojpeg.c:1774:4: 
1772. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;
1773. 			ob[sizeof(uint32)+2]=0;
1774. 			ob[sizeof(uint32)+3]=67;
         ^
1775. 			ob[sizeof(uint32)+4]=m;
1776. 			TIFFSeekFile(tif,sp->qtable_offset[m],SEEK_SET); 

libtiff/tif_ojpeg.c:1775:4: 
1773. 			ob[sizeof(uint32)+2]=0;
1774. 			ob[sizeof(uint32)+3]=67;
1775. 			ob[sizeof(uint32)+4]=m;
         ^
1776. 			TIFFSeekFile(tif,sp->qtable_offset[m],SEEK_SET); 
1777. 			p=TIFFReadFile(tif,&ob[sizeof(uint32)+5],64);

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

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

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

libtiff/tif_ojpeg.c:1779:5: 
1777. 			p=TIFFReadFile(tif,&ob[sizeof(uint32)+5],64);
1778. 			if (p!=64)
1779. 				return(0);
          ^
1780. 			sp->qtable[m]=ob;
1781. 			sp->sof_tq[m]=m;
