tools/tiffcrop.c:8375: error: Memory Leak
  memory dynamically allocated by call to `_TIFFmalloc()` at line 8222, column 34 is not reachable after line 8375, column 5.

tools/tiffcrop.c:8176:1: start of procedure rotateImage()
8174. 
8175. /* Rotate an image by a multiple of 90 degrees clockwise */
8176. static int
      ^
8177. rotateImage(uint16 rotation, struct image_data *image, uint32 *img_width, 
8178.             uint32 *img_length, unsigned char **ibuff_ptr)

tools/tiffcrop.c:8190:3: 
8188.   uint16   spp, bps;
8189.   float    res_temp;
8190.   unsigned char *rbuff = NULL;
        ^
8191. 
8192.   width  = *img_width;

tools/tiffcrop.c:8192:3: 
8190.   unsigned char *rbuff = NULL;
8191. 
8192.   width  = *img_width;
        ^
8193.   length = *img_length;
8194.   spp = image->spp;

tools/tiffcrop.c:8193:3: 
8191. 
8192.   width  = *img_width;
8193.   length = *img_length;
        ^
8194.   spp = image->spp;
8195.   bps = image->bps;

tools/tiffcrop.c:8194:3: 
8192.   width  = *img_width;
8193.   length = *img_length;
8194.   spp = image->spp;
        ^
8195.   bps = image->bps;
8196. 

tools/tiffcrop.c:8195:3: 
8193.   length = *img_length;
8194.   spp = image->spp;
8195.   bps = image->bps;
        ^
8196. 
8197.   rowsize = ((bps * spp * width) + 7) / 8;

tools/tiffcrop.c:8197:3: 
8195.   bps = image->bps;
8196. 
8197.   rowsize = ((bps * spp * width) + 7) / 8;
        ^
8198.   colsize = ((bps * spp * length) + 7) / 8;
8199.   if ((colsize * width) > (rowsize * length))

tools/tiffcrop.c:8198:3: 
8196. 
8197.   rowsize = ((bps * spp * width) + 7) / 8;
8198.   colsize = ((bps * spp * length) + 7) / 8;
        ^
8199.   if ((colsize * width) > (rowsize * length))
8200.     buffsize = (colsize + 1) * width;

tools/tiffcrop.c:8199:7: Taking true branch
8197.   rowsize = ((bps * spp * width) + 7) / 8;
8198.   colsize = ((bps * spp * length) + 7) / 8;
8199.   if ((colsize * width) > (rowsize * length))
            ^
8200.     buffsize = (colsize + 1) * width;
8201.   else

tools/tiffcrop.c:8200:5: 
8198.   colsize = ((bps * spp * length) + 7) / 8;
8199.   if ((colsize * width) > (rowsize * length))
8200.     buffsize = (colsize + 1) * width;
          ^
8201.   else
8202.     buffsize = (rowsize + 1) * length;

tools/tiffcrop.c:8204:3: 
8202.     buffsize = (rowsize + 1) * length;
8203. 
8204.   bytes_per_sample = (bps + 7) / 8;
        ^
8205.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8206.   if (bytes_per_pixel < (bytes_per_sample + 1))

tools/tiffcrop.c:8205:3: 
8203. 
8204.   bytes_per_sample = (bps + 7) / 8;
8205.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
        ^
8206.   if (bytes_per_pixel < (bytes_per_sample + 1))
8207.     shift_width = bytes_per_pixel;

tools/tiffcrop.c:8206:7: Taking false branch
8204.   bytes_per_sample = (bps + 7) / 8;
8205.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8206.   if (bytes_per_pixel < (bytes_per_sample + 1))
            ^
8207.     shift_width = bytes_per_pixel;
8208.   else

tools/tiffcrop.c:8209:5: 
8207.     shift_width = bytes_per_pixel;
8208.   else
8209.     shift_width = bytes_per_sample + 1;
          ^
8210. 
8211.   switch (rotation)

tools/tiffcrop.c:8211:3: 
8209.     shift_width = bytes_per_sample + 1;
8210. 
8211.   switch (rotation)
        ^
8212.     {
8213.     case 0:

tools/tiffcrop.c:8213:5: Switch condition is false. Skipping switch case
8211.   switch (rotation)
8212.     {
8213.     case 0:
          ^
8214.     case 360: return (0);
8215.     case 90:

tools/tiffcrop.c:8214:5: Switch condition is false. Skipping switch case
8212.     {
8213.     case 0:
8214.     case 360: return (0);
          ^
8215.     case 90:
8216.     case 180:

tools/tiffcrop.c:8215:5: Switch condition is false. Skipping switch case
8213.     case 0:
8214.     case 360: return (0);
8215.     case 90:
          ^
8216.     case 180:
8217.     case 270: break;

tools/tiffcrop.c:8216:5: Switch condition is true. Entering switch case
8214.     case 360: return (0);
8215.     case 90:
8216.     case 180:
          ^
8217.     case 270: break;
8218.     default:  TIFFError("rotateImage", "Invalid rotation angle %d", rotation);

tools/tiffcrop.c:8222:9: 
8220.     }
8221. 
8222.   if (!(rbuff = (unsigned char *)_TIFFmalloc(buffsize)))
              ^
8223.     {
8224.     TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize);

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

tools/tiffcrop.c:8222:9: Taking false branch
8220.     }
8221. 
8222.   if (!(rbuff = (unsigned char *)_TIFFmalloc(buffsize)))
              ^
8223.     {
8224.     TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize);

tools/tiffcrop.c:8227:3: 
8225.     return (-1);
8226.     }
8227.   _TIFFmemset(rbuff, '\0', buffsize);
        ^
8228. 
8229.   ibuff = *ibuff_ptr;

libtiff/tif_unix.c:271:1: start of procedure _TIFFmemset()
  269. }
  270. 
  271. void
       ^
  272. _TIFFmemset(void* p, int v, tmsize_t c)
  273. {

libtiff/tif_unix.c:274:2: 
  272. _TIFFmemset(void* p, int v, tmsize_t c)
  273. {
  274. 	memset(p, v, (size_t) c);
        ^
  275. }
  276. 

libtiff/tif_unix.c:275:1: return from a call to _TIFFmemset
  273. {
  274. 	memset(p, v, (size_t) c);
  275. }
       ^
  276. 
  277. void

tools/tiffcrop.c:8229:3: 
8227.   _TIFFmemset(rbuff, '\0', buffsize);
8228. 
8229.   ibuff = *ibuff_ptr;
        ^
8230.   switch (rotation)
8231.     {

tools/tiffcrop.c:8230:3: 
8228. 
8229.   ibuff = *ibuff_ptr;
8230.   switch (rotation)
        ^
8231.     {
8232.     case 180: if ((bps % 8) == 0) /* byte alligned data */

tools/tiffcrop.c:8232:5: Switch condition is false. Skipping switch case
8230.   switch (rotation)
8231.     {
8232.     case 180: if ((bps % 8) == 0) /* byte alligned data */
          ^
8233.                 { 
8234.                 src = ibuff;

tools/tiffcrop.c:8298:5: Switch condition is false. Skipping switch case
8296.               break;
8297. 
8298.     case 90:  if ((bps % 8) == 0) /* byte aligned data */
          ^
8299.                 {
8300.                 for (col = 0; col < width; col++)

tools/tiffcrop.c:8375:5: Switch condition is false. Skipping switch case
8373. 	      break;
8374. 
8375.     case 270: if ((bps % 8) == 0) /* byte aligned data */
          ^
8376.                 {
8377.                 for (col = 0; col < width; col++)
