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

tools/tiffcrop.c:8372:1: start of procedure rotateImage()
8370. 
8371. /* Rotate an image by a multiple of 90 degrees clockwise */
8372. static int
      ^
8373. rotateImage(uint16 rotation, struct image_data *image, uint32 *img_width, 
8374.             uint32 *img_length, unsigned char **ibuff_ptr)

tools/tiffcrop.c:8386:3: 
8384.   uint16   spp, bps;
8385.   float    res_temp;
8386.   unsigned char *rbuff = NULL;
        ^
8387. 
8388.   width  = *img_width;

tools/tiffcrop.c:8388:3: 
8386.   unsigned char *rbuff = NULL;
8387. 
8388.   width  = *img_width;
        ^
8389.   length = *img_length;
8390.   spp = image->spp;

tools/tiffcrop.c:8389:3: 
8387. 
8388.   width  = *img_width;
8389.   length = *img_length;
        ^
8390.   spp = image->spp;
8391.   bps = image->bps;

tools/tiffcrop.c:8390:3: 
8388.   width  = *img_width;
8389.   length = *img_length;
8390.   spp = image->spp;
        ^
8391.   bps = image->bps;
8392. 

tools/tiffcrop.c:8391:3: 
8389.   length = *img_length;
8390.   spp = image->spp;
8391.   bps = image->bps;
        ^
8392. 
8393.   rowsize = ((bps * spp * width) + 7) / 8;

tools/tiffcrop.c:8393:3: 
8391.   bps = image->bps;
8392. 
8393.   rowsize = ((bps * spp * width) + 7) / 8;
        ^
8394.   colsize = ((bps * spp * length) + 7) / 8;
8395.   if ((colsize * width) > (rowsize * length))

tools/tiffcrop.c:8394:3: 
8392. 
8393.   rowsize = ((bps * spp * width) + 7) / 8;
8394.   colsize = ((bps * spp * length) + 7) / 8;
        ^
8395.   if ((colsize * width) > (rowsize * length))
8396.     buffsize = (colsize + 1) * width;

tools/tiffcrop.c:8395:7: Taking true branch
8393.   rowsize = ((bps * spp * width) + 7) / 8;
8394.   colsize = ((bps * spp * length) + 7) / 8;
8395.   if ((colsize * width) > (rowsize * length))
            ^
8396.     buffsize = (colsize + 1) * width;
8397.   else

tools/tiffcrop.c:8396:5: 
8394.   colsize = ((bps * spp * length) + 7) / 8;
8395.   if ((colsize * width) > (rowsize * length))
8396.     buffsize = (colsize + 1) * width;
          ^
8397.   else
8398.     buffsize = (rowsize + 1) * length;

tools/tiffcrop.c:8400:3: 
8398.     buffsize = (rowsize + 1) * length;
8399. 
8400.   bytes_per_sample = (bps + 7) / 8;
        ^
8401.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8402.   if (bytes_per_pixel < (bytes_per_sample + 1))

tools/tiffcrop.c:8401:3: 
8399. 
8400.   bytes_per_sample = (bps + 7) / 8;
8401.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
        ^
8402.   if (bytes_per_pixel < (bytes_per_sample + 1))
8403.     shift_width = bytes_per_pixel;

tools/tiffcrop.c:8402:7: Taking false branch
8400.   bytes_per_sample = (bps + 7) / 8;
8401.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8402.   if (bytes_per_pixel < (bytes_per_sample + 1))
            ^
8403.     shift_width = bytes_per_pixel;
8404.   else

tools/tiffcrop.c:8405:5: 
8403.     shift_width = bytes_per_pixel;
8404.   else
8405.     shift_width = bytes_per_sample + 1;
          ^
8406. 
8407.   switch (rotation)

tools/tiffcrop.c:8407:3: 
8405.     shift_width = bytes_per_sample + 1;
8406. 
8407.   switch (rotation)
        ^
8408.     {
8409.     case 0:

tools/tiffcrop.c:8409:5: Switch condition is false. Skipping switch case
8407.   switch (rotation)
8408.     {
8409.     case 0:
          ^
8410.     case 360: return (0);
8411.     case 90:

tools/tiffcrop.c:8410:5: Switch condition is false. Skipping switch case
8408.     {
8409.     case 0:
8410.     case 360: return (0);
          ^
8411.     case 90:
8412.     case 180:

tools/tiffcrop.c:8411:5: Switch condition is false. Skipping switch case
8409.     case 0:
8410.     case 360: return (0);
8411.     case 90:
          ^
8412.     case 180:
8413.     case 270: break;

tools/tiffcrop.c:8412:5: Switch condition is true. Entering switch case
8410.     case 360: return (0);
8411.     case 90:
8412.     case 180:
          ^
8413.     case 270: break;
8414.     default:  TIFFError("rotateImage", "Invalid rotation angle %d", rotation);

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

tools/tiffcrop.c:8423:3: 
8421.     return (-1);
8422.     }
8423.   _TIFFmemset(rbuff, '\0', buffsize);
        ^
8424. 
8425.   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:8425:3: 
8423.   _TIFFmemset(rbuff, '\0', buffsize);
8424. 
8425.   ibuff = *ibuff_ptr;
        ^
8426.   switch (rotation)
8427.     {

tools/tiffcrop.c:8426:3: 
8424. 
8425.   ibuff = *ibuff_ptr;
8426.   switch (rotation)
        ^
8427.     {
8428.     case 180: if ((bps % 8) == 0) /* byte alligned data */

tools/tiffcrop.c:8428:5: Switch condition is false. Skipping switch case
8426.   switch (rotation)
8427.     {
8428.     case 180: if ((bps % 8) == 0) /* byte alligned data */
          ^
8429.                 { 
8430.                 src = ibuff;

tools/tiffcrop.c:8494:5: Switch condition is false. Skipping switch case
8492.               break;
8493. 
8494.     case 90:  if ((bps % 8) == 0) /* byte aligned data */
          ^
8495.                 {
8496.                 for (col = 0; col < width; col++)

tools/tiffcrop.c:8571:5: Switch condition is false. Skipping switch case
8569. 	      break;
8570. 
8571.     case 270: if ((bps % 8) == 0) /* byte aligned data */
          ^
8572.                 {
8573.                 for (col = 0; col < width; col++)
