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

tools/tiffcrop.c:8318:1: start of procedure rotateImage()
8316. 
8317. /* Rotate an image by a multiple of 90 degrees clockwise */
8318. static int
      ^
8319. rotateImage(uint16 rotation, struct image_data *image, uint32 *img_width, 
8320.             uint32 *img_length, unsigned char **ibuff_ptr)

tools/tiffcrop.c:8332:3: 
8330.   uint16   spp, bps;
8331.   float    res_temp;
8332.   unsigned char *rbuff = NULL;
        ^
8333. 
8334.   width  = *img_width;

tools/tiffcrop.c:8334:3: 
8332.   unsigned char *rbuff = NULL;
8333. 
8334.   width  = *img_width;
        ^
8335.   length = *img_length;
8336.   spp = image->spp;

tools/tiffcrop.c:8335:3: 
8333. 
8334.   width  = *img_width;
8335.   length = *img_length;
        ^
8336.   spp = image->spp;
8337.   bps = image->bps;

tools/tiffcrop.c:8336:3: 
8334.   width  = *img_width;
8335.   length = *img_length;
8336.   spp = image->spp;
        ^
8337.   bps = image->bps;
8338. 

tools/tiffcrop.c:8337:3: 
8335.   length = *img_length;
8336.   spp = image->spp;
8337.   bps = image->bps;
        ^
8338. 
8339.   rowsize = ((bps * spp * width) + 7) / 8;

tools/tiffcrop.c:8339:3: 
8337.   bps = image->bps;
8338. 
8339.   rowsize = ((bps * spp * width) + 7) / 8;
        ^
8340.   colsize = ((bps * spp * length) + 7) / 8;
8341.   if ((colsize * width) > (rowsize * length))

tools/tiffcrop.c:8340:3: 
8338. 
8339.   rowsize = ((bps * spp * width) + 7) / 8;
8340.   colsize = ((bps * spp * length) + 7) / 8;
        ^
8341.   if ((colsize * width) > (rowsize * length))
8342.     buffsize = (colsize + 1) * width;

tools/tiffcrop.c:8341:7: Taking true branch
8339.   rowsize = ((bps * spp * width) + 7) / 8;
8340.   colsize = ((bps * spp * length) + 7) / 8;
8341.   if ((colsize * width) > (rowsize * length))
            ^
8342.     buffsize = (colsize + 1) * width;
8343.   else

tools/tiffcrop.c:8342:5: 
8340.   colsize = ((bps * spp * length) + 7) / 8;
8341.   if ((colsize * width) > (rowsize * length))
8342.     buffsize = (colsize + 1) * width;
          ^
8343.   else
8344.     buffsize = (rowsize + 1) * length;

tools/tiffcrop.c:8346:3: 
8344.     buffsize = (rowsize + 1) * length;
8345. 
8346.   bytes_per_sample = (bps + 7) / 8;
        ^
8347.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8348.   if (bytes_per_pixel < (bytes_per_sample + 1))

tools/tiffcrop.c:8347:3: 
8345. 
8346.   bytes_per_sample = (bps + 7) / 8;
8347.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
        ^
8348.   if (bytes_per_pixel < (bytes_per_sample + 1))
8349.     shift_width = bytes_per_pixel;

tools/tiffcrop.c:8348:7: Taking false branch
8346.   bytes_per_sample = (bps + 7) / 8;
8347.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8348.   if (bytes_per_pixel < (bytes_per_sample + 1))
            ^
8349.     shift_width = bytes_per_pixel;
8350.   else

tools/tiffcrop.c:8351:5: 
8349.     shift_width = bytes_per_pixel;
8350.   else
8351.     shift_width = bytes_per_sample + 1;
          ^
8352. 
8353.   switch (rotation)

tools/tiffcrop.c:8353:3: 
8351.     shift_width = bytes_per_sample + 1;
8352. 
8353.   switch (rotation)
        ^
8354.     {
8355.     case 0:

tools/tiffcrop.c:8355:5: Switch condition is false. Skipping switch case
8353.   switch (rotation)
8354.     {
8355.     case 0:
          ^
8356.     case 360: return (0);
8357.     case 90:

tools/tiffcrop.c:8356:5: Switch condition is false. Skipping switch case
8354.     {
8355.     case 0:
8356.     case 360: return (0);
          ^
8357.     case 90:
8358.     case 180:

tools/tiffcrop.c:8357:5: Switch condition is false. Skipping switch case
8355.     case 0:
8356.     case 360: return (0);
8357.     case 90:
          ^
8358.     case 180:
8359.     case 270: break;

tools/tiffcrop.c:8358:5: Switch condition is true. Entering switch case
8356.     case 360: return (0);
8357.     case 90:
8358.     case 180:
          ^
8359.     case 270: break;
8360.     default:  TIFFError("rotateImage", "Invalid rotation angle %d", rotation);

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

tools/tiffcrop.c:8369:3: 
8367.     return (-1);
8368.     }
8369.   _TIFFmemset(rbuff, '\0', buffsize);
        ^
8370. 
8371.   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:8371:3: 
8369.   _TIFFmemset(rbuff, '\0', buffsize);
8370. 
8371.   ibuff = *ibuff_ptr;
        ^
8372.   switch (rotation)
8373.     {

tools/tiffcrop.c:8372:3: 
8370. 
8371.   ibuff = *ibuff_ptr;
8372.   switch (rotation)
        ^
8373.     {
8374.     case 180: if ((bps % 8) == 0) /* byte alligned data */

tools/tiffcrop.c:8374:5: Switch condition is false. Skipping switch case
8372.   switch (rotation)
8373.     {
8374.     case 180: if ((bps % 8) == 0) /* byte alligned data */
          ^
8375.                 { 
8376.                 src = ibuff;

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

tools/tiffcrop.c:8517:5: Switch condition is false. Skipping switch case
8515. 	      break;
8516. 
8517.     case 270: if ((bps % 8) == 0) /* byte aligned data */
          ^
8518.                 {
8519.                 for (col = 0; col < width; col++)
