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

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

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

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

tools/tiffcrop.c:8386:3: 
8384. 
8385.   width  = *img_width;
8386.   length = *img_length;
        ^
8387.   spp = image->spp;
8388.   bps = image->bps;

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

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

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

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

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

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

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

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

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

tools/tiffcrop.c:8402:5: 
8400.     shift_width = bytes_per_pixel;
8401.   else
8402.     shift_width = bytes_per_sample + 1;
          ^
8403. 
8404.   switch (rotation)

tools/tiffcrop.c:8404:3: 
8402.     shift_width = bytes_per_sample + 1;
8403. 
8404.   switch (rotation)
        ^
8405.     {
8406.     case 0:

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

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

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

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

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

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

tools/tiffcrop.c:8423:3: 
8421. 
8422.   ibuff = *ibuff_ptr;
8423.   switch (rotation)
        ^
8424.     {
8425.     case 180: if ((bps % 8) == 0) /* byte aligned data */

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

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

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