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

libtiff/tif_ojpeg.c:1707:1: start of procedure OJPEGReadHeaderInfoSecTablesQTable()
1705. }
1706. 
1707. static int
      ^
1708. OJPEGReadHeaderInfoSecTablesQTable(TIFF* tif)
1709. {

libtiff/tif_ojpeg.c:1710:2: 
1708. OJPEGReadHeaderInfoSecTablesQTable(TIFF* tif)
1709. {
1710. 	static const char module[]="OJPEGReadHeaderInfoSecTablesQTable";
       ^
1711. 	OJPEGState* sp=(OJPEGState*)tif->tif_data;
1712. 	uint8 m;

libtiff/tif_ojpeg.c:1711:2: 
1709. {
1710. 	static const char module[]="OJPEGReadHeaderInfoSecTablesQTable";
1711. 	OJPEGState* sp=(OJPEGState*)tif->tif_data;
       ^
1712. 	uint8 m;
1713. 	uint8 n;

libtiff/tif_ojpeg.c:1717:6: Taking false branch
1715. 	uint8* ob;
1716. 	uint32 p;
1717. 	if (sp->qtable_offset[0]==0)
           ^
1718. 	{
1719. 		TIFFErrorExt(tif->tif_clientdata,module,"Missing JPEG tables");

libtiff/tif_ojpeg.c:1722:2: 
1720. 		return(0);
1721. 	}
1722. 	sp->in_buffer_file_pos_log=0;
       ^
1723. 	for (m=0; m<sp->samples_per_pixel; m++)
1724. 	{

libtiff/tif_ojpeg.c:1723:7: 
1721. 	}
1722. 	sp->in_buffer_file_pos_log=0;
1723. 	for (m=0; m<sp->samples_per_pixel; m++)
            ^
1724. 	{
1725. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))

libtiff/tif_ojpeg.c:1723:12: Loop condition is true. Entering loop body
1721. 	}
1722. 	sp->in_buffer_file_pos_log=0;
1723. 	for (m=0; m<sp->samples_per_pixel; m++)
                 ^
1724. 	{
1725. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))

libtiff/tif_ojpeg.c:1725:8: Taking true branch
1723. 	for (m=0; m<sp->samples_per_pixel; m++)
1724. 	{
1725. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))
             ^
1726. 		{
1727. 			for (n=0; n<m-1; n++)

libtiff/tif_ojpeg.c:1725:38: Taking true branch
1723. 	for (m=0; m<sp->samples_per_pixel; m++)
1724. 	{
1725. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))
                                           ^
1726. 		{
1727. 			for (n=0; n<m-1; n++)

libtiff/tif_ojpeg.c:1727:9: 
1725. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))
1726. 		{
1727. 			for (n=0; n<m-1; n++)
              ^
1728. 			{
1729. 				if (sp->qtable_offset[m]==sp->qtable_offset[n])

libtiff/tif_ojpeg.c:1727:14: Loop condition is false. Leaving loop
1725. 		if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))
1726. 		{
1727. 			for (n=0; n<m-1; n++)
                   ^
1728. 			{
1729. 				if (sp->qtable_offset[m]==sp->qtable_offset[n])

libtiff/tif_ojpeg.c:1735:4: 
1733. 				}
1734. 			}
1735. 			oa=sizeof(uint32)+69;
         ^
1736. 			ob=_TIFFmalloc(oa);
1737. 			if (ob==0)

libtiff/tif_ojpeg.c:1736:4: 
1734. 			}
1735. 			oa=sizeof(uint32)+69;
1736. 			ob=_TIFFmalloc(oa);
         ^
1737. 			if (ob==0)
1738. 			{

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:1737:8: Taking false branch
1735. 			oa=sizeof(uint32)+69;
1736. 			ob=_TIFFmalloc(oa);
1737. 			if (ob==0)
             ^
1738. 			{
1739. 				TIFFErrorExt(tif->tif_clientdata,module,"Out of memory");

libtiff/tif_ojpeg.c:1742:4: 
1740. 				return(0);
1741. 			}
1742. 			*(uint32*)ob=oa;
         ^
1743. 			ob[sizeof(uint32)]=255;
1744. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;

libtiff/tif_ojpeg.c:1743:4: 
1741. 			}
1742. 			*(uint32*)ob=oa;
1743. 			ob[sizeof(uint32)]=255;
         ^
1744. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;
1745. 			ob[sizeof(uint32)+2]=0;

libtiff/tif_ojpeg.c:1744:4: 
1742. 			*(uint32*)ob=oa;
1743. 			ob[sizeof(uint32)]=255;
1744. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;
         ^
1745. 			ob[sizeof(uint32)+2]=0;
1746. 			ob[sizeof(uint32)+3]=67;

libtiff/tif_ojpeg.c:1745:4: 
1743. 			ob[sizeof(uint32)]=255;
1744. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;
1745. 			ob[sizeof(uint32)+2]=0;
         ^
1746. 			ob[sizeof(uint32)+3]=67;
1747. 			ob[sizeof(uint32)+4]=m;

libtiff/tif_ojpeg.c:1746:4: 
1744. 			ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;
1745. 			ob[sizeof(uint32)+2]=0;
1746. 			ob[sizeof(uint32)+3]=67;
         ^
1747. 			ob[sizeof(uint32)+4]=m;
1748. 			TIFFSeekFile(tif,sp->qtable_offset[m],SEEK_SET); 

libtiff/tif_ojpeg.c:1747:4: 
1745. 			ob[sizeof(uint32)+2]=0;
1746. 			ob[sizeof(uint32)+3]=67;
1747. 			ob[sizeof(uint32)+4]=m;
         ^
1748. 			TIFFSeekFile(tif,sp->qtable_offset[m],SEEK_SET); 
1749. 			p=TIFFReadFile(tif,&ob[sizeof(uint32)+5],64);

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

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

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

libtiff/tif_ojpeg.c:1751:5: 
1749. 			p=TIFFReadFile(tif,&ob[sizeof(uint32)+5],64);
1750. 			if (p!=64)
1751. 				return(0);
          ^
1752. 			sp->qtable[m]=ob;
1753. 			sp->sof_tq[m]=m;
