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

tools/tiffcrop.c:8355:1: start of procedure rotateImage()
8353. 
8354. /* Rotate an image by a multiple of 90 degrees clockwise */
8355. static int
      ^
8356. rotateImage(uint16 rotation, struct image_data *image, uint32 *img_width, 
8357.             uint32 *img_length, unsigned char **ibuff_ptr)

tools/tiffcrop.c:8369:3: 
8367.   uint16   spp, bps;
8368.   float    res_temp;
8369.   unsigned char *rbuff = NULL;
        ^
8370. 
8371.   width  = *img_width;

tools/tiffcrop.c:8371:3: 
8369.   unsigned char *rbuff = NULL;
8370. 
8371.   width  = *img_width;
        ^
8372.   length = *img_length;
8373.   spp = image->spp;

tools/tiffcrop.c:8372:3: 
8370. 
8371.   width  = *img_width;
8372.   length = *img_length;
        ^
8373.   spp = image->spp;
8374.   bps = image->bps;

tools/tiffcrop.c:8373:3: 
8371.   width  = *img_width;
8372.   length = *img_length;
8373.   spp = image->spp;
        ^
8374.   bps = image->bps;
8375. 

tools/tiffcrop.c:8374:3: 
8372.   length = *img_length;
8373.   spp = image->spp;
8374.   bps = image->bps;
        ^
8375. 
8376.   rowsize = ((bps * spp * width) + 7) / 8;

tools/tiffcrop.c:8376:3: 
8374.   bps = image->bps;
8375. 
8376.   rowsize = ((bps * spp * width) + 7) / 8;
        ^
8377.   colsize = ((bps * spp * length) + 7) / 8;
8378.   if ((colsize * width) > (rowsize * length))

tools/tiffcrop.c:8377:3: 
8375. 
8376.   rowsize = ((bps * spp * width) + 7) / 8;
8377.   colsize = ((bps * spp * length) + 7) / 8;
        ^
8378.   if ((colsize * width) > (rowsize * length))
8379.     buffsize = (colsize + 1) * width;

tools/tiffcrop.c:8378:7: Taking true branch
8376.   rowsize = ((bps * spp * width) + 7) / 8;
8377.   colsize = ((bps * spp * length) + 7) / 8;
8378.   if ((colsize * width) > (rowsize * length))
            ^
8379.     buffsize = (colsize + 1) * width;
8380.   else

tools/tiffcrop.c:8379:5: 
8377.   colsize = ((bps * spp * length) + 7) / 8;
8378.   if ((colsize * width) > (rowsize * length))
8379.     buffsize = (colsize + 1) * width;
          ^
8380.   else
8381.     buffsize = (rowsize + 1) * length;

tools/tiffcrop.c:8383:3: 
8381.     buffsize = (rowsize + 1) * length;
8382. 
8383.   bytes_per_sample = (bps + 7) / 8;
        ^
8384.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8385.   if (bytes_per_pixel < (bytes_per_sample + 1))

tools/tiffcrop.c:8384:3: 
8382. 
8383.   bytes_per_sample = (bps + 7) / 8;
8384.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
        ^
8385.   if (bytes_per_pixel < (bytes_per_sample + 1))
8386.     shift_width = bytes_per_pixel;

tools/tiffcrop.c:8385:7: Taking false branch
8383.   bytes_per_sample = (bps + 7) / 8;
8384.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8385.   if (bytes_per_pixel < (bytes_per_sample + 1))
            ^
8386.     shift_width = bytes_per_pixel;
8387.   else

tools/tiffcrop.c:8388:5: 
8386.     shift_width = bytes_per_pixel;
8387.   else
8388.     shift_width = bytes_per_sample + 1;
          ^
8389. 
8390.   switch (rotation)

tools/tiffcrop.c:8390:3: 
8388.     shift_width = bytes_per_sample + 1;
8389. 
8390.   switch (rotation)
        ^
8391.     {
8392.     case 0:

tools/tiffcrop.c:8392:5: Switch condition is false. Skipping switch case
8390.   switch (rotation)
8391.     {
8392.     case 0:
          ^
8393.     case 360: return (0);
8394.     case 90:

tools/tiffcrop.c:8393:5: Switch condition is false. Skipping switch case
8391.     {
8392.     case 0:
8393.     case 360: return (0);
          ^
8394.     case 90:
8395.     case 180:

tools/tiffcrop.c:8394:5: Switch condition is false. Skipping switch case
8392.     case 0:
8393.     case 360: return (0);
8394.     case 90:
          ^
8395.     case 180:
8396.     case 270: break;

tools/tiffcrop.c:8395:5: Switch condition is true. Entering switch case
8393.     case 360: return (0);
8394.     case 90:
8395.     case 180:
          ^
8396.     case 270: break;
8397.     default:  TIFFError("rotateImage", "Invalid rotation angle %d", rotation);

tools/tiffcrop.c:8401:9: 
8399.     }
8400. 
8401.   if (!(rbuff = (unsigned char *)_TIFFmalloc(buffsize)))
              ^
8402.     {
8403.     TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize);

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

tools/tiffcrop.c:8401:9: Taking false branch
8399.     }
8400. 
8401.   if (!(rbuff = (unsigned char *)_TIFFmalloc(buffsize)))
              ^
8402.     {
8403.     TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize);

tools/tiffcrop.c:8406:3: 
8404.     return (-1);
8405.     }
8406.   _TIFFmemset(rbuff, '\0', buffsize);
        ^
8407. 
8408.   ibuff = *ibuff_ptr;

libtiff/tif_unix.c:331:1: start of procedure _TIFFmemset()
  329. }
  330. 
  331. void
       ^
  332. _TIFFmemset(void* p, int v, tmsize_t c)
  333. {

libtiff/tif_unix.c:334:2: 
  332. _TIFFmemset(void* p, int v, tmsize_t c)
  333. {
  334. 	memset(p, v, (size_t) c);
        ^
  335. }
  336. 

libtiff/tif_unix.c:335:1: return from a call to _TIFFmemset
  333. {
  334. 	memset(p, v, (size_t) c);
  335. }
       ^
  336. 
  337. void

tools/tiffcrop.c:8408:3: 
8406.   _TIFFmemset(rbuff, '\0', buffsize);
8407. 
8408.   ibuff = *ibuff_ptr;
        ^
8409.   switch (rotation)
8410.     {

tools/tiffcrop.c:8409:3: 
8407. 
8408.   ibuff = *ibuff_ptr;
8409.   switch (rotation)
        ^
8410.     {
8411.     case 180: if ((bps % 8) == 0) /* byte alligned data */

tools/tiffcrop.c:8411:5: Switch condition is false. Skipping switch case
8409.   switch (rotation)
8410.     {
8411.     case 180: if ((bps % 8) == 0) /* byte alligned data */
          ^
8412.                 { 
8413.                 src = ibuff;

tools/tiffcrop.c:8477:5: Switch condition is false. Skipping switch case
8475.               break;
8476. 
8477.     case 90:  if ((bps % 8) == 0) /* byte aligned data */
          ^
8478.                 {
8479.                 for (col = 0; col < width; col++)

tools/tiffcrop.c:8554:5: Switch condition is false. Skipping switch case
8552. 	      break;
8553. 
8554.     case 270: if ((bps % 8) == 0) /* byte aligned data */
          ^
8555.                 {
8556.                 for (col = 0; col < width; col++)
