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

tools/tiffcrop.c:8229:1: start of procedure rotateImage()
8227. 
8228. /* Rotate an image by a multiple of 90 degrees clockwise */
8229. static int
      ^
8230. rotateImage(uint16 rotation, struct image_data *image, uint32 *img_width, 
8231.             uint32 *img_length, unsigned char **ibuff_ptr)

tools/tiffcrop.c:8243:3: 
8241.   uint16   spp, bps;
8242.   float    res_temp;
8243.   unsigned char *rbuff = NULL;
        ^
8244. 
8245.   width  = *img_width;

tools/tiffcrop.c:8245:3: 
8243.   unsigned char *rbuff = NULL;
8244. 
8245.   width  = *img_width;
        ^
8246.   length = *img_length;
8247.   spp = image->spp;

tools/tiffcrop.c:8246:3: 
8244. 
8245.   width  = *img_width;
8246.   length = *img_length;
        ^
8247.   spp = image->spp;
8248.   bps = image->bps;

tools/tiffcrop.c:8247:3: 
8245.   width  = *img_width;
8246.   length = *img_length;
8247.   spp = image->spp;
        ^
8248.   bps = image->bps;
8249. 

tools/tiffcrop.c:8248:3: 
8246.   length = *img_length;
8247.   spp = image->spp;
8248.   bps = image->bps;
        ^
8249. 
8250.   rowsize = ((bps * spp * width) + 7) / 8;

tools/tiffcrop.c:8250:3: 
8248.   bps = image->bps;
8249. 
8250.   rowsize = ((bps * spp * width) + 7) / 8;
        ^
8251.   colsize = ((bps * spp * length) + 7) / 8;
8252.   if ((colsize * width) > (rowsize * length))

tools/tiffcrop.c:8251:3: 
8249. 
8250.   rowsize = ((bps * spp * width) + 7) / 8;
8251.   colsize = ((bps * spp * length) + 7) / 8;
        ^
8252.   if ((colsize * width) > (rowsize * length))
8253.     buffsize = (colsize + 1) * width;

tools/tiffcrop.c:8252:7: Taking true branch
8250.   rowsize = ((bps * spp * width) + 7) / 8;
8251.   colsize = ((bps * spp * length) + 7) / 8;
8252.   if ((colsize * width) > (rowsize * length))
            ^
8253.     buffsize = (colsize + 1) * width;
8254.   else

tools/tiffcrop.c:8253:5: 
8251.   colsize = ((bps * spp * length) + 7) / 8;
8252.   if ((colsize * width) > (rowsize * length))
8253.     buffsize = (colsize + 1) * width;
          ^
8254.   else
8255.     buffsize = (rowsize + 1) * length;

tools/tiffcrop.c:8257:3: 
8255.     buffsize = (rowsize + 1) * length;
8256. 
8257.   bytes_per_sample = (bps + 7) / 8;
        ^
8258.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8259.   if (bytes_per_pixel < (bytes_per_sample + 1))

tools/tiffcrop.c:8258:3: 
8256. 
8257.   bytes_per_sample = (bps + 7) / 8;
8258.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
        ^
8259.   if (bytes_per_pixel < (bytes_per_sample + 1))
8260.     shift_width = bytes_per_pixel;

tools/tiffcrop.c:8259:7: Taking false branch
8257.   bytes_per_sample = (bps + 7) / 8;
8258.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8259.   if (bytes_per_pixel < (bytes_per_sample + 1))
            ^
8260.     shift_width = bytes_per_pixel;
8261.   else

tools/tiffcrop.c:8262:5: 
8260.     shift_width = bytes_per_pixel;
8261.   else
8262.     shift_width = bytes_per_sample + 1;
          ^
8263. 
8264.   switch (rotation)

tools/tiffcrop.c:8264:3: 
8262.     shift_width = bytes_per_sample + 1;
8263. 
8264.   switch (rotation)
        ^
8265.     {
8266.     case 0:

tools/tiffcrop.c:8266:5: Switch condition is false. Skipping switch case
8264.   switch (rotation)
8265.     {
8266.     case 0:
          ^
8267.     case 360: return (0);
8268.     case 90:

tools/tiffcrop.c:8267:5: Switch condition is false. Skipping switch case
8265.     {
8266.     case 0:
8267.     case 360: return (0);
          ^
8268.     case 90:
8269.     case 180:

tools/tiffcrop.c:8268:5: Switch condition is false. Skipping switch case
8266.     case 0:
8267.     case 360: return (0);
8268.     case 90:
          ^
8269.     case 180:
8270.     case 270: break;

tools/tiffcrop.c:8269:5: Switch condition is true. Entering switch case
8267.     case 360: return (0);
8268.     case 90:
8269.     case 180:
          ^
8270.     case 270: break;
8271.     default:  TIFFError("rotateImage", "Invalid rotation angle %d", rotation);

tools/tiffcrop.c:8275:9: 
8273.     }
8274. 
8275.   if (!(rbuff = (unsigned char *)_TIFFmalloc(buffsize)))
              ^
8276.     {
8277.     TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize);

libtiff/tif_unix.c:257:1: start of procedure _TIFFmalloc()
  255. #endif
  256. 
  257. void*
       ^
  258. _TIFFmalloc(tmsize_t s)
  259. {

libtiff/tif_unix.c:260:13: Taking false branch
  258. _TIFFmalloc(tmsize_t s)
  259. {
  260.         if (s == 0)
                   ^
  261.                 return ((void *) NULL);
  262. 

libtiff/tif_unix.c:263:2: 
  261.                 return ((void *) NULL);
  262. 
  263. 	return (malloc((size_t) s));
        ^
  264. }
  265. 

libtiff/tif_unix.c:264:1: return from a call to _TIFFmalloc
  262. 
  263. 	return (malloc((size_t) s));
  264. }
       ^
  265. 
  266. void

tools/tiffcrop.c:8275:9: Taking false branch
8273.     }
8274. 
8275.   if (!(rbuff = (unsigned char *)_TIFFmalloc(buffsize)))
              ^
8276.     {
8277.     TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize);

tools/tiffcrop.c:8280:3: 
8278.     return (-1);
8279.     }
8280.   _TIFFmemset(rbuff, '\0', buffsize);
        ^
8281. 
8282.   ibuff = *ibuff_ptr;

libtiff/tif_unix.c:278:1: start of procedure _TIFFmemset()
  276. }
  277. 
  278. void
       ^
  279. _TIFFmemset(void* p, int v, tmsize_t c)
  280. {

libtiff/tif_unix.c:281:2: 
  279. _TIFFmemset(void* p, int v, tmsize_t c)
  280. {
  281. 	memset(p, v, (size_t) c);
        ^
  282. }
  283. 

libtiff/tif_unix.c:282:1: return from a call to _TIFFmemset
  280. {
  281. 	memset(p, v, (size_t) c);
  282. }
       ^
  283. 
  284. void

tools/tiffcrop.c:8282:3: 
8280.   _TIFFmemset(rbuff, '\0', buffsize);
8281. 
8282.   ibuff = *ibuff_ptr;
        ^
8283.   switch (rotation)
8284.     {

tools/tiffcrop.c:8283:3: 
8281. 
8282.   ibuff = *ibuff_ptr;
8283.   switch (rotation)
        ^
8284.     {
8285.     case 180: if ((bps % 8) == 0) /* byte alligned data */

tools/tiffcrop.c:8285:5: Switch condition is false. Skipping switch case
8283.   switch (rotation)
8284.     {
8285.     case 180: if ((bps % 8) == 0) /* byte alligned data */
          ^
8286.                 { 
8287.                 src = ibuff;

tools/tiffcrop.c:8351:5: Switch condition is false. Skipping switch case
8349.               break;
8350. 
8351.     case 90:  if ((bps % 8) == 0) /* byte aligned data */
          ^
8352.                 {
8353.                 for (col = 0; col < width; col++)

tools/tiffcrop.c:8428:5: Switch condition is false. Skipping switch case
8426. 	      break;
8427. 
8428.     case 270: if ((bps % 8) == 0) /* byte aligned data */
          ^
8429.                 {
8430.                 for (col = 0; col < width; col++)
