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

tools/tiffcrop.c:8240:1: start of procedure rotateImage()
8238. 
8239. /* Rotate an image by a multiple of 90 degrees clockwise */
8240. static int
      ^
8241. rotateImage(uint16 rotation, struct image_data *image, uint32 *img_width, 
8242.             uint32 *img_length, unsigned char **ibuff_ptr)

tools/tiffcrop.c:8254:3: 
8252.   uint16   spp, bps;
8253.   float    res_temp;
8254.   unsigned char *rbuff = NULL;
        ^
8255. 
8256.   width  = *img_width;

tools/tiffcrop.c:8256:3: 
8254.   unsigned char *rbuff = NULL;
8255. 
8256.   width  = *img_width;
        ^
8257.   length = *img_length;
8258.   spp = image->spp;

tools/tiffcrop.c:8257:3: 
8255. 
8256.   width  = *img_width;
8257.   length = *img_length;
        ^
8258.   spp = image->spp;
8259.   bps = image->bps;

tools/tiffcrop.c:8258:3: 
8256.   width  = *img_width;
8257.   length = *img_length;
8258.   spp = image->spp;
        ^
8259.   bps = image->bps;
8260. 

tools/tiffcrop.c:8259:3: 
8257.   length = *img_length;
8258.   spp = image->spp;
8259.   bps = image->bps;
        ^
8260. 
8261.   rowsize = ((bps * spp * width) + 7) / 8;

tools/tiffcrop.c:8261:3: 
8259.   bps = image->bps;
8260. 
8261.   rowsize = ((bps * spp * width) + 7) / 8;
        ^
8262.   colsize = ((bps * spp * length) + 7) / 8;
8263.   if ((colsize * width) > (rowsize * length))

tools/tiffcrop.c:8262:3: 
8260. 
8261.   rowsize = ((bps * spp * width) + 7) / 8;
8262.   colsize = ((bps * spp * length) + 7) / 8;
        ^
8263.   if ((colsize * width) > (rowsize * length))
8264.     buffsize = (colsize + 1) * width;

tools/tiffcrop.c:8263:7: Taking true branch
8261.   rowsize = ((bps * spp * width) + 7) / 8;
8262.   colsize = ((bps * spp * length) + 7) / 8;
8263.   if ((colsize * width) > (rowsize * length))
            ^
8264.     buffsize = (colsize + 1) * width;
8265.   else

tools/tiffcrop.c:8264:5: 
8262.   colsize = ((bps * spp * length) + 7) / 8;
8263.   if ((colsize * width) > (rowsize * length))
8264.     buffsize = (colsize + 1) * width;
          ^
8265.   else
8266.     buffsize = (rowsize + 1) * length;

tools/tiffcrop.c:8268:3: 
8266.     buffsize = (rowsize + 1) * length;
8267. 
8268.   bytes_per_sample = (bps + 7) / 8;
        ^
8269.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8270.   if (bytes_per_pixel < (bytes_per_sample + 1))

tools/tiffcrop.c:8269:3: 
8267. 
8268.   bytes_per_sample = (bps + 7) / 8;
8269.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
        ^
8270.   if (bytes_per_pixel < (bytes_per_sample + 1))
8271.     shift_width = bytes_per_pixel;

tools/tiffcrop.c:8270:7: Taking false branch
8268.   bytes_per_sample = (bps + 7) / 8;
8269.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8270.   if (bytes_per_pixel < (bytes_per_sample + 1))
            ^
8271.     shift_width = bytes_per_pixel;
8272.   else

tools/tiffcrop.c:8273:5: 
8271.     shift_width = bytes_per_pixel;
8272.   else
8273.     shift_width = bytes_per_sample + 1;
          ^
8274. 
8275.   switch (rotation)

tools/tiffcrop.c:8275:3: 
8273.     shift_width = bytes_per_sample + 1;
8274. 
8275.   switch (rotation)
        ^
8276.     {
8277.     case 0:

tools/tiffcrop.c:8277:5: Switch condition is false. Skipping switch case
8275.   switch (rotation)
8276.     {
8277.     case 0:
          ^
8278.     case 360: return (0);
8279.     case 90:

tools/tiffcrop.c:8278:5: Switch condition is false. Skipping switch case
8276.     {
8277.     case 0:
8278.     case 360: return (0);
          ^
8279.     case 90:
8280.     case 180:

tools/tiffcrop.c:8279:5: Switch condition is false. Skipping switch case
8277.     case 0:
8278.     case 360: return (0);
8279.     case 90:
          ^
8280.     case 180:
8281.     case 270: break;

tools/tiffcrop.c:8280:5: Switch condition is true. Entering switch case
8278.     case 360: return (0);
8279.     case 90:
8280.     case 180:
          ^
8281.     case 270: break;
8282.     default:  TIFFError("rotateImage", "Invalid rotation angle %d", rotation);

tools/tiffcrop.c:8286:9: 
8284.     }
8285. 
8286.   if (!(rbuff = (unsigned char *)_TIFFmalloc(buffsize)))
              ^
8287.     {
8288.     TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize);

libtiff/tif_unix.c:277:1: start of procedure _TIFFmalloc()
  275. #endif
  276. 
  277. void*
       ^
  278. _TIFFmalloc(tmsize_t s)
  279. {

libtiff/tif_unix.c:280:13: Taking false branch
  278. _TIFFmalloc(tmsize_t s)
  279. {
  280.         if (s == 0)
                   ^
  281.                 return ((void *) NULL);
  282. 

libtiff/tif_unix.c:283:2: 
  281.                 return ((void *) NULL);
  282. 
  283. 	return (malloc((size_t) s));
        ^
  284. }
  285. 

libtiff/tif_unix.c:284:1: return from a call to _TIFFmalloc
  282. 
  283. 	return (malloc((size_t) s));
  284. }
       ^
  285. 
  286. void

tools/tiffcrop.c:8286:9: Taking false branch
8284.     }
8285. 
8286.   if (!(rbuff = (unsigned char *)_TIFFmalloc(buffsize)))
              ^
8287.     {
8288.     TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize);

tools/tiffcrop.c:8291:3: 
8289.     return (-1);
8290.     }
8291.   _TIFFmemset(rbuff, '\0', buffsize);
        ^
8292. 
8293.   ibuff = *ibuff_ptr;

libtiff/tif_unix.c:298:1: start of procedure _TIFFmemset()
  296. }
  297. 
  298. void
       ^
  299. _TIFFmemset(void* p, int v, tmsize_t c)
  300. {

libtiff/tif_unix.c:301:2: 
  299. _TIFFmemset(void* p, int v, tmsize_t c)
  300. {
  301. 	memset(p, v, (size_t) c);
        ^
  302. }
  303. 

libtiff/tif_unix.c:302:1: return from a call to _TIFFmemset
  300. {
  301. 	memset(p, v, (size_t) c);
  302. }
       ^
  303. 
  304. void

tools/tiffcrop.c:8293:3: 
8291.   _TIFFmemset(rbuff, '\0', buffsize);
8292. 
8293.   ibuff = *ibuff_ptr;
        ^
8294.   switch (rotation)
8295.     {

tools/tiffcrop.c:8294:3: 
8292. 
8293.   ibuff = *ibuff_ptr;
8294.   switch (rotation)
        ^
8295.     {
8296.     case 180: if ((bps % 8) == 0) /* byte alligned data */

tools/tiffcrop.c:8296:5: Switch condition is false. Skipping switch case
8294.   switch (rotation)
8295.     {
8296.     case 180: if ((bps % 8) == 0) /* byte alligned data */
          ^
8297.                 { 
8298.                 src = ibuff;

tools/tiffcrop.c:8362:5: Switch condition is false. Skipping switch case
8360.               break;
8361. 
8362.     case 90:  if ((bps % 8) == 0) /* byte aligned data */
          ^
8363.                 {
8364.                 for (col = 0; col < width; col++)

tools/tiffcrop.c:8439:5: Switch condition is false. Skipping switch case
8437. 	      break;
8438. 
8439.     case 270: if ((bps % 8) == 0) /* byte aligned data */
          ^
8440.                 {
8441.                 for (col = 0; col < width; col++)
