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

tools/tiffcrop.c:8204:1: start of procedure rotateImage()
8202. 
8203. /* Rotate an image by a multiple of 90 degrees clockwise */
8204. static int
      ^
8205. rotateImage(uint16 rotation, struct image_data *image, uint32 *img_width, 
8206.             uint32 *img_length, unsigned char **ibuff_ptr)

tools/tiffcrop.c:8218:3: 
8216.   uint16   spp, bps;
8217.   float    res_temp;
8218.   unsigned char *rbuff = NULL;
        ^
8219. 
8220.   width  = *img_width;

tools/tiffcrop.c:8220:3: 
8218.   unsigned char *rbuff = NULL;
8219. 
8220.   width  = *img_width;
        ^
8221.   length = *img_length;
8222.   spp = image->spp;

tools/tiffcrop.c:8221:3: 
8219. 
8220.   width  = *img_width;
8221.   length = *img_length;
        ^
8222.   spp = image->spp;
8223.   bps = image->bps;

tools/tiffcrop.c:8222:3: 
8220.   width  = *img_width;
8221.   length = *img_length;
8222.   spp = image->spp;
        ^
8223.   bps = image->bps;
8224. 

tools/tiffcrop.c:8223:3: 
8221.   length = *img_length;
8222.   spp = image->spp;
8223.   bps = image->bps;
        ^
8224. 
8225.   rowsize = ((bps * spp * width) + 7) / 8;

tools/tiffcrop.c:8225:3: 
8223.   bps = image->bps;
8224. 
8225.   rowsize = ((bps * spp * width) + 7) / 8;
        ^
8226.   colsize = ((bps * spp * length) + 7) / 8;
8227.   if ((colsize * width) > (rowsize * length))

tools/tiffcrop.c:8226:3: 
8224. 
8225.   rowsize = ((bps * spp * width) + 7) / 8;
8226.   colsize = ((bps * spp * length) + 7) / 8;
        ^
8227.   if ((colsize * width) > (rowsize * length))
8228.     buffsize = (colsize + 1) * width;

tools/tiffcrop.c:8227:7: Taking true branch
8225.   rowsize = ((bps * spp * width) + 7) / 8;
8226.   colsize = ((bps * spp * length) + 7) / 8;
8227.   if ((colsize * width) > (rowsize * length))
            ^
8228.     buffsize = (colsize + 1) * width;
8229.   else

tools/tiffcrop.c:8228:5: 
8226.   colsize = ((bps * spp * length) + 7) / 8;
8227.   if ((colsize * width) > (rowsize * length))
8228.     buffsize = (colsize + 1) * width;
          ^
8229.   else
8230.     buffsize = (rowsize + 1) * length;

tools/tiffcrop.c:8232:3: 
8230.     buffsize = (rowsize + 1) * length;
8231. 
8232.   bytes_per_sample = (bps + 7) / 8;
        ^
8233.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8234.   if (bytes_per_pixel < (bytes_per_sample + 1))

tools/tiffcrop.c:8233:3: 
8231. 
8232.   bytes_per_sample = (bps + 7) / 8;
8233.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
        ^
8234.   if (bytes_per_pixel < (bytes_per_sample + 1))
8235.     shift_width = bytes_per_pixel;

tools/tiffcrop.c:8234:7: Taking false branch
8232.   bytes_per_sample = (bps + 7) / 8;
8233.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8234.   if (bytes_per_pixel < (bytes_per_sample + 1))
            ^
8235.     shift_width = bytes_per_pixel;
8236.   else

tools/tiffcrop.c:8237:5: 
8235.     shift_width = bytes_per_pixel;
8236.   else
8237.     shift_width = bytes_per_sample + 1;
          ^
8238. 
8239.   switch (rotation)

tools/tiffcrop.c:8239:3: 
8237.     shift_width = bytes_per_sample + 1;
8238. 
8239.   switch (rotation)
        ^
8240.     {
8241.     case 0:

tools/tiffcrop.c:8241:5: Switch condition is false. Skipping switch case
8239.   switch (rotation)
8240.     {
8241.     case 0:
          ^
8242.     case 360: return (0);
8243.     case 90:

tools/tiffcrop.c:8242:5: Switch condition is false. Skipping switch case
8240.     {
8241.     case 0:
8242.     case 360: return (0);
          ^
8243.     case 90:
8244.     case 180:

tools/tiffcrop.c:8243:5: Switch condition is false. Skipping switch case
8241.     case 0:
8242.     case 360: return (0);
8243.     case 90:
          ^
8244.     case 180:
8245.     case 270: break;

tools/tiffcrop.c:8244:5: Switch condition is true. Entering switch case
8242.     case 360: return (0);
8243.     case 90:
8244.     case 180:
          ^
8245.     case 270: break;
8246.     default:  TIFFError("rotateImage", "Invalid rotation angle %d", rotation);

tools/tiffcrop.c:8250:9: 
8248.     }
8249. 
8250.   if (!(rbuff = (unsigned char *)_TIFFmalloc(buffsize)))
              ^
8251.     {
8252.     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:8250:9: Taking false branch
8248.     }
8249. 
8250.   if (!(rbuff = (unsigned char *)_TIFFmalloc(buffsize)))
              ^
8251.     {
8252.     TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize);

tools/tiffcrop.c:8255:3: 
8253.     return (-1);
8254.     }
8255.   _TIFFmemset(rbuff, '\0', buffsize);
        ^
8256. 
8257.   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:8257:3: 
8255.   _TIFFmemset(rbuff, '\0', buffsize);
8256. 
8257.   ibuff = *ibuff_ptr;
        ^
8258.   switch (rotation)
8259.     {

tools/tiffcrop.c:8258:3: 
8256. 
8257.   ibuff = *ibuff_ptr;
8258.   switch (rotation)
        ^
8259.     {
8260.     case 180: if ((bps % 8) == 0) /* byte alligned data */

tools/tiffcrop.c:8260:5: Switch condition is false. Skipping switch case
8258.   switch (rotation)
8259.     {
8260.     case 180: if ((bps % 8) == 0) /* byte alligned data */
          ^
8261.                 { 
8262.                 src = ibuff;

tools/tiffcrop.c:8326:5: Switch condition is false. Skipping switch case
8324.               break;
8325. 
8326.     case 90:  if ((bps % 8) == 0) /* byte aligned data */
          ^
8327.                 {
8328.                 for (col = 0; col < width; col++)

tools/tiffcrop.c:8403:5: Switch condition is false. Skipping switch case
8401. 	      break;
8402. 
8403.     case 270: if ((bps % 8) == 0) /* byte aligned data */
          ^
8404.                 {
8405.                 for (col = 0; col < width; col++)
