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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

tools/tiffcrop.c:8408:9: 
8406.     }
8407. 
8408.   if (!(rbuff = (unsigned char *)_TIFFmalloc(buffsize)))
              ^
8409.     {
8410.     TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize);

libtiff/tif_unix.c:308:1: start of procedure _TIFFmalloc()
  306. #endif
  307. 
  308. void*
       ^
  309. _TIFFmalloc(tmsize_t s)
  310. {

libtiff/tif_unix.c:311:13: Taking false branch
  309. _TIFFmalloc(tmsize_t s)
  310. {
  311.         if (s == 0)
                   ^
  312.                 return ((void *) NULL);
  313. 

libtiff/tif_unix.c:314:2: 
  312.                 return ((void *) NULL);
  313. 
  314. 	return (malloc((size_t) s));
        ^
  315. }
  316. 

libtiff/tif_unix.c:315:1: return from a call to _TIFFmalloc
  313. 
  314. 	return (malloc((size_t) s));
  315. }
       ^
  316. 
  317. void* _TIFFcalloc(tmsize_t nmemb, tmsize_t siz)

tools/tiffcrop.c:8408:9: Taking false branch
8406.     }
8407. 
8408.   if (!(rbuff = (unsigned char *)_TIFFmalloc(buffsize)))
              ^
8409.     {
8410.     TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize);

tools/tiffcrop.c:8413:3: 
8411.     return (-1);
8412.     }
8413.   _TIFFmemset(rbuff, '\0', buffsize);
        ^
8414. 
8415.   ibuff = *ibuff_ptr;

libtiff/tif_unix.c:337:1: start of procedure _TIFFmemset()
  335. }
  336. 
  337. void
       ^
  338. _TIFFmemset(void* p, int v, tmsize_t c)
  339. {

libtiff/tif_unix.c:340:2: 
  338. _TIFFmemset(void* p, int v, tmsize_t c)
  339. {
  340. 	memset(p, v, (size_t) c);
        ^
  341. }
  342. 

libtiff/tif_unix.c:341:1: return from a call to _TIFFmemset
  339. {
  340. 	memset(p, v, (size_t) c);
  341. }
       ^
  342. 
  343. void

tools/tiffcrop.c:8415:3: 
8413.   _TIFFmemset(rbuff, '\0', buffsize);
8414. 
8415.   ibuff = *ibuff_ptr;
        ^
8416.   switch (rotation)
8417.     {

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

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

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

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