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

tools/tiffcrop.c:8364:1: start of procedure rotateImage()
8362. 
8363. /* Rotate an image by a multiple of 90 degrees clockwise */
8364. static int
      ^
8365. rotateImage(uint16 rotation, struct image_data *image, uint32 *img_width, 
8366.             uint32 *img_length, unsigned char **ibuff_ptr)

tools/tiffcrop.c:8378:3: 
8376.   uint16   spp, bps;
8377.   float    res_temp;
8378.   unsigned char *rbuff = NULL;
        ^
8379. 
8380.   width  = *img_width;

tools/tiffcrop.c:8380:3: 
8378.   unsigned char *rbuff = NULL;
8379. 
8380.   width  = *img_width;
        ^
8381.   length = *img_length;
8382.   spp = image->spp;

tools/tiffcrop.c:8381:3: 
8379. 
8380.   width  = *img_width;
8381.   length = *img_length;
        ^
8382.   spp = image->spp;
8383.   bps = image->bps;

tools/tiffcrop.c:8382:3: 
8380.   width  = *img_width;
8381.   length = *img_length;
8382.   spp = image->spp;
        ^
8383.   bps = image->bps;
8384. 

tools/tiffcrop.c:8383:3: 
8381.   length = *img_length;
8382.   spp = image->spp;
8383.   bps = image->bps;
        ^
8384. 
8385.   rowsize = ((bps * spp * width) + 7) / 8;

tools/tiffcrop.c:8385:3: 
8383.   bps = image->bps;
8384. 
8385.   rowsize = ((bps * spp * width) + 7) / 8;
        ^
8386.   colsize = ((bps * spp * length) + 7) / 8;
8387.   if ((colsize * width) > (rowsize * length))

tools/tiffcrop.c:8386:3: 
8384. 
8385.   rowsize = ((bps * spp * width) + 7) / 8;
8386.   colsize = ((bps * spp * length) + 7) / 8;
        ^
8387.   if ((colsize * width) > (rowsize * length))
8388.     buffsize = (colsize + 1) * width;

tools/tiffcrop.c:8387:7: Taking true branch
8385.   rowsize = ((bps * spp * width) + 7) / 8;
8386.   colsize = ((bps * spp * length) + 7) / 8;
8387.   if ((colsize * width) > (rowsize * length))
            ^
8388.     buffsize = (colsize + 1) * width;
8389.   else

tools/tiffcrop.c:8388:5: 
8386.   colsize = ((bps * spp * length) + 7) / 8;
8387.   if ((colsize * width) > (rowsize * length))
8388.     buffsize = (colsize + 1) * width;
          ^
8389.   else
8390.     buffsize = (rowsize + 1) * length;

tools/tiffcrop.c:8392:3: 
8390.     buffsize = (rowsize + 1) * length;
8391. 
8392.   bytes_per_sample = (bps + 7) / 8;
        ^
8393.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8394.   if (bytes_per_pixel < (bytes_per_sample + 1))

tools/tiffcrop.c:8393:3: 
8391. 
8392.   bytes_per_sample = (bps + 7) / 8;
8393.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
        ^
8394.   if (bytes_per_pixel < (bytes_per_sample + 1))
8395.     shift_width = bytes_per_pixel;

tools/tiffcrop.c:8394:7: Taking false branch
8392.   bytes_per_sample = (bps + 7) / 8;
8393.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8394.   if (bytes_per_pixel < (bytes_per_sample + 1))
            ^
8395.     shift_width = bytes_per_pixel;
8396.   else

tools/tiffcrop.c:8397:5: 
8395.     shift_width = bytes_per_pixel;
8396.   else
8397.     shift_width = bytes_per_sample + 1;
          ^
8398. 
8399.   switch (rotation)

tools/tiffcrop.c:8399:3: 
8397.     shift_width = bytes_per_sample + 1;
8398. 
8399.   switch (rotation)
        ^
8400.     {
8401.     case 0:

tools/tiffcrop.c:8401:5: Switch condition is false. Skipping switch case
8399.   switch (rotation)
8400.     {
8401.     case 0:
          ^
8402.     case 360: return (0);
8403.     case 90:

tools/tiffcrop.c:8402:5: Switch condition is false. Skipping switch case
8400.     {
8401.     case 0:
8402.     case 360: return (0);
          ^
8403.     case 90:
8404.     case 180:

tools/tiffcrop.c:8403:5: Switch condition is false. Skipping switch case
8401.     case 0:
8402.     case 360: return (0);
8403.     case 90:
          ^
8404.     case 180:
8405.     case 270: break;

tools/tiffcrop.c:8404:5: Switch condition is true. Entering switch case
8402.     case 360: return (0);
8403.     case 90:
8404.     case 180:
          ^
8405.     case 270: break;
8406.     default:  TIFFError("rotateImage", "Invalid rotation angle %d", rotation);

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

tools/tiffcrop.c:8415:3: 
8413.     return (-1);
8414.     }
8415.   _TIFFmemset(rbuff, '\0', buffsize);
        ^
8416. 
8417.   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:8417:3: 
8415.   _TIFFmemset(rbuff, '\0', buffsize);
8416. 
8417.   ibuff = *ibuff_ptr;
        ^
8418.   switch (rotation)
8419.     {

tools/tiffcrop.c:8418:3: 
8416. 
8417.   ibuff = *ibuff_ptr;
8418.   switch (rotation)
        ^
8419.     {
8420.     case 180: if ((bps % 8) == 0) /* byte alligned data */

tools/tiffcrop.c:8420:5: Switch condition is false. Skipping switch case
8418.   switch (rotation)
8419.     {
8420.     case 180: if ((bps % 8) == 0) /* byte alligned data */
          ^
8421.                 { 
8422.                 src = ibuff;

tools/tiffcrop.c:8486:5: Switch condition is false. Skipping switch case
8484.               break;
8485. 
8486.     case 90:  if ((bps % 8) == 0) /* byte aligned data */
          ^
8487.                 {
8488.                 for (col = 0; col < width; col++)

tools/tiffcrop.c:8563:5: Switch condition is false. Skipping switch case
8561. 	      break;
8562. 
8563.     case 270: if ((bps % 8) == 0) /* byte aligned data */
          ^
8564.                 {
8565.                 for (col = 0; col < width; col++)
