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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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