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

libtiff/tif_ojpeg.c:1749:1: start of procedure OJPEGReadHeaderInfoSecTablesQTable()
1747. }
1748. 
1749. static int
      ^
1750. OJPEGReadHeaderInfoSecTablesQTable(TIFF* tif)
1751. {

libtiff/tif_ojpeg.c:1752:2: 
1750. OJPEGReadHeaderInfoSecTablesQTable(TIFF* tif)
1751. {
1752. 	static const char module[]="OJPEGReadHeaderInfoSecTablesQTable";
       ^
1753. 	OJPEGState* sp=(OJPEGState*)tif->tif_data;
1754. 	uint8 m;

libtiff/tif_ojpeg.c:1753:2: 
1751. {
1752. 	static const char module[]="OJPEGReadHeaderInfoSecTablesQTable";
1753. 	OJPEGState* sp=(OJPEGState*)tif->tif_data;
       ^
1754. 	uint8 m;
1755. 	uint8 n;

libtiff/tif_ojpeg.c:1759:6: Taking false branch
1757. 	uint8* ob;
1758. 	uint32 p;
1759. 	if (sp->qtable_offset[0]==0)
           ^
1760. 	{
1761. 		TIFFErrorExt(tif->tif_clientdata,module,"Missing JPEG tables");

libtiff/tif_ojpeg.c:1764:2: 
1762. 		return(0);
1763. 	}
1764. 	sp->in_buffer_file_pos_log=0;
       ^
1765. 	for (m=0; m<sp->samples_per_pixel; m++)
1766. 	{

libtiff/tif_ojpeg.c:1765:7: 
1763. 	}
1764. 	sp->in_buffer_file_pos_log=0;
1765. 	for (m=0; m<sp->samples_per_pixel; m++)
            ^
1766. 	{
1767. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))

libtiff/tif_ojpeg.c:1765:12: Loop condition is true. Entering loop body
1763. 	}
1764. 	sp->in_buffer_file_pos_log=0;
1765. 	for (m=0; m<sp->samples_per_pixel; m++)
                 ^
1766. 	{
1767. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))

libtiff/tif_ojpeg.c:1767:8: Taking true branch
1765. 	for (m=0; m<sp->samples_per_pixel; m++)
1766. 	{
1767. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))
             ^
1768. 		{
1769. 			for (n=0; n<m-1; n++)

libtiff/tif_ojpeg.c:1767:38: Taking true branch
1765. 	for (m=0; m<sp->samples_per_pixel; m++)
1766. 	{
1767. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))
                                           ^
1768. 		{
1769. 			for (n=0; n<m-1; n++)

libtiff/tif_ojpeg.c:1769:9: 
1767. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))
1768. 		{
1769. 			for (n=0; n<m-1; n++)
              ^
1770. 			{
1771. 				if (sp->qtable_offset[m]==sp->qtable_offset[n])

libtiff/tif_ojpeg.c:1769:14: Loop condition is false. Leaving loop
1767. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))
1768. 		{
1769. 			for (n=0; n<m-1; n++)
                   ^
1770. 			{
1771. 				if (sp->qtable_offset[m]==sp->qtable_offset[n])

libtiff/tif_ojpeg.c:1777:4: 
1775. 				}
1776. 			}
1777. 			oa=sizeof(uint32)+69;
         ^
1778. 			ob=_TIFFmalloc(oa);
1779. 			if (ob==0)

libtiff/tif_ojpeg.c:1778:4: 
1776. 			}
1777. 			oa=sizeof(uint32)+69;
1778. 			ob=_TIFFmalloc(oa);
         ^
1779. 			if (ob==0)
1780. 			{

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

libtiff/tif_ojpeg.c:1779:8: Taking false branch
1777. 			oa=sizeof(uint32)+69;
1778. 			ob=_TIFFmalloc(oa);
1779. 			if (ob==0)
             ^
1780. 			{
1781. 				TIFFErrorExt(tif->tif_clientdata,module,"Out of memory");

libtiff/tif_ojpeg.c:1784:4: 
1782. 				return(0);
1783. 			}
1784. 			*(uint32*)ob=oa;
         ^
1785. 			ob[sizeof(uint32)]=255;
1786. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;

libtiff/tif_ojpeg.c:1785:4: 
1783. 			}
1784. 			*(uint32*)ob=oa;
1785. 			ob[sizeof(uint32)]=255;
         ^
1786. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;
1787. 			ob[sizeof(uint32)+2]=0;

libtiff/tif_ojpeg.c:1786:4: 
1784. 			*(uint32*)ob=oa;
1785. 			ob[sizeof(uint32)]=255;
1786. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;
         ^
1787. 			ob[sizeof(uint32)+2]=0;
1788. 			ob[sizeof(uint32)+3]=67;

libtiff/tif_ojpeg.c:1787:4: 
1785. 			ob[sizeof(uint32)]=255;
1786. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;
1787. 			ob[sizeof(uint32)+2]=0;
         ^
1788. 			ob[sizeof(uint32)+3]=67;
1789. 			ob[sizeof(uint32)+4]=m;

libtiff/tif_ojpeg.c:1788:4: 
1786. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;
1787. 			ob[sizeof(uint32)+2]=0;
1788. 			ob[sizeof(uint32)+3]=67;
         ^
1789. 			ob[sizeof(uint32)+4]=m;
1790. 			TIFFSeekFile(tif,sp->qtable_offset[m],SEEK_SET); 

libtiff/tif_ojpeg.c:1789:4: 
1787. 			ob[sizeof(uint32)+2]=0;
1788. 			ob[sizeof(uint32)+3]=67;
1789. 			ob[sizeof(uint32)+4]=m;
         ^
1790. 			TIFFSeekFile(tif,sp->qtable_offset[m],SEEK_SET); 
1791. 			p=(uint32)TIFFReadFile(tif,&ob[sizeof(uint32)+5],64);

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

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

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

libtiff/tif_ojpeg.c:1793:5: 
1791. 			p=(uint32)TIFFReadFile(tif,&ob[sizeof(uint32)+5],64);
1792. 			if (p!=64)
1793. 				return(0);
          ^
1794. 			sp->qtable[m]=ob;
1795. 			sp->sof_tq[m]=m;
