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

tools/tiffcrop.c:8306:1: start of procedure rotateImage()
8304. 
8305. /* Rotate an image by a multiple of 90 degrees clockwise */
8306. static int
      ^
8307. rotateImage(uint16 rotation, struct image_data *image, uint32 *img_width, 
8308.             uint32 *img_length, unsigned char **ibuff_ptr)

tools/tiffcrop.c:8320:3: 
8318.   uint16   spp, bps;
8319.   float    res_temp;
8320.   unsigned char *rbuff = NULL;
        ^
8321. 
8322.   width  = *img_width;

tools/tiffcrop.c:8322:3: 
8320.   unsigned char *rbuff = NULL;
8321. 
8322.   width  = *img_width;
        ^
8323.   length = *img_length;
8324.   spp = image->spp;

tools/tiffcrop.c:8323:3: 
8321. 
8322.   width  = *img_width;
8323.   length = *img_length;
        ^
8324.   spp = image->spp;
8325.   bps = image->bps;

tools/tiffcrop.c:8324:3: 
8322.   width  = *img_width;
8323.   length = *img_length;
8324.   spp = image->spp;
        ^
8325.   bps = image->bps;
8326. 

tools/tiffcrop.c:8325:3: 
8323.   length = *img_length;
8324.   spp = image->spp;
8325.   bps = image->bps;
        ^
8326. 
8327.   rowsize = ((bps * spp * width) + 7) / 8;

tools/tiffcrop.c:8327:3: 
8325.   bps = image->bps;
8326. 
8327.   rowsize = ((bps * spp * width) + 7) / 8;
        ^
8328.   colsize = ((bps * spp * length) + 7) / 8;
8329.   if ((colsize * width) > (rowsize * length))

tools/tiffcrop.c:8328:3: 
8326. 
8327.   rowsize = ((bps * spp * width) + 7) / 8;
8328.   colsize = ((bps * spp * length) + 7) / 8;
        ^
8329.   if ((colsize * width) > (rowsize * length))
8330.     buffsize = (colsize + 1) * width;

tools/tiffcrop.c:8329:7: Taking true branch
8327.   rowsize = ((bps * spp * width) + 7) / 8;
8328.   colsize = ((bps * spp * length) + 7) / 8;
8329.   if ((colsize * width) > (rowsize * length))
            ^
8330.     buffsize = (colsize + 1) * width;
8331.   else

tools/tiffcrop.c:8330:5: 
8328.   colsize = ((bps * spp * length) + 7) / 8;
8329.   if ((colsize * width) > (rowsize * length))
8330.     buffsize = (colsize + 1) * width;
          ^
8331.   else
8332.     buffsize = (rowsize + 1) * length;

tools/tiffcrop.c:8334:3: 
8332.     buffsize = (rowsize + 1) * length;
8333. 
8334.   bytes_per_sample = (bps + 7) / 8;
        ^
8335.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8336.   if (bytes_per_pixel < (bytes_per_sample + 1))

tools/tiffcrop.c:8335:3: 
8333. 
8334.   bytes_per_sample = (bps + 7) / 8;
8335.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
        ^
8336.   if (bytes_per_pixel < (bytes_per_sample + 1))
8337.     shift_width = bytes_per_pixel;

tools/tiffcrop.c:8336:7: Taking false branch
8334.   bytes_per_sample = (bps + 7) / 8;
8335.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8336.   if (bytes_per_pixel < (bytes_per_sample + 1))
            ^
8337.     shift_width = bytes_per_pixel;
8338.   else

tools/tiffcrop.c:8339:5: 
8337.     shift_width = bytes_per_pixel;
8338.   else
8339.     shift_width = bytes_per_sample + 1;
          ^
8340. 
8341.   switch (rotation)

tools/tiffcrop.c:8341:3: 
8339.     shift_width = bytes_per_sample + 1;
8340. 
8341.   switch (rotation)
        ^
8342.     {
8343.     case 0:

tools/tiffcrop.c:8343:5: Switch condition is false. Skipping switch case
8341.   switch (rotation)
8342.     {
8343.     case 0:
          ^
8344.     case 360: return (0);
8345.     case 90:

tools/tiffcrop.c:8344:5: Switch condition is false. Skipping switch case
8342.     {
8343.     case 0:
8344.     case 360: return (0);
          ^
8345.     case 90:
8346.     case 180:

tools/tiffcrop.c:8345:5: Switch condition is false. Skipping switch case
8343.     case 0:
8344.     case 360: return (0);
8345.     case 90:
          ^
8346.     case 180:
8347.     case 270: break;

tools/tiffcrop.c:8346:5: Switch condition is true. Entering switch case
8344.     case 360: return (0);
8345.     case 90:
8346.     case 180:
          ^
8347.     case 270: break;
8348.     default:  TIFFError("rotateImage", "Invalid rotation angle %d", rotation);

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

tools/tiffcrop.c:8357:3: 
8355.     return (-1);
8356.     }
8357.   _TIFFmemset(rbuff, '\0', buffsize);
        ^
8358. 
8359.   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:8359:3: 
8357.   _TIFFmemset(rbuff, '\0', buffsize);
8358. 
8359.   ibuff = *ibuff_ptr;
        ^
8360.   switch (rotation)
8361.     {

tools/tiffcrop.c:8360:3: 
8358. 
8359.   ibuff = *ibuff_ptr;
8360.   switch (rotation)
        ^
8361.     {
8362.     case 180: if ((bps % 8) == 0) /* byte alligned data */

tools/tiffcrop.c:8362:5: Switch condition is false. Skipping switch case
8360.   switch (rotation)
8361.     {
8362.     case 180: if ((bps % 8) == 0) /* byte alligned data */
          ^
8363.                 { 
8364.                 src = ibuff;

tools/tiffcrop.c:8428:5: Switch condition is false. Skipping switch case
8426.               break;
8427. 
8428.     case 90:  if ((bps % 8) == 0) /* byte aligned data */
          ^
8429.                 {
8430.                 for (col = 0; col < width; col++)

tools/tiffcrop.c:8505:5: Switch condition is false. Skipping switch case
8503. 	      break;
8504. 
8505.     case 270: if ((bps % 8) == 0) /* byte aligned data */
          ^
8506.                 {
8507.                 for (col = 0; col < width; col++)
