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

tools/tiffcrop.c:8235:1: start of procedure rotateImage()
8233. 
8234. /* Rotate an image by a multiple of 90 degrees clockwise */
8235. static int
      ^
8236. rotateImage(uint16 rotation, struct image_data *image, uint32 *img_width, 
8237.             uint32 *img_length, unsigned char **ibuff_ptr)

tools/tiffcrop.c:8249:3: 
8247.   uint16   spp, bps;
8248.   float    res_temp;
8249.   unsigned char *rbuff = NULL;
        ^
8250. 
8251.   width  = *img_width;

tools/tiffcrop.c:8251:3: 
8249.   unsigned char *rbuff = NULL;
8250. 
8251.   width  = *img_width;
        ^
8252.   length = *img_length;
8253.   spp = image->spp;

tools/tiffcrop.c:8252:3: 
8250. 
8251.   width  = *img_width;
8252.   length = *img_length;
        ^
8253.   spp = image->spp;
8254.   bps = image->bps;

tools/tiffcrop.c:8253:3: 
8251.   width  = *img_width;
8252.   length = *img_length;
8253.   spp = image->spp;
        ^
8254.   bps = image->bps;
8255. 

tools/tiffcrop.c:8254:3: 
8252.   length = *img_length;
8253.   spp = image->spp;
8254.   bps = image->bps;
        ^
8255. 
8256.   rowsize = ((bps * spp * width) + 7) / 8;

tools/tiffcrop.c:8256:3: 
8254.   bps = image->bps;
8255. 
8256.   rowsize = ((bps * spp * width) + 7) / 8;
        ^
8257.   colsize = ((bps * spp * length) + 7) / 8;
8258.   if ((colsize * width) > (rowsize * length))

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

tools/tiffcrop.c:8258:7: Taking true branch
8256.   rowsize = ((bps * spp * width) + 7) / 8;
8257.   colsize = ((bps * spp * length) + 7) / 8;
8258.   if ((colsize * width) > (rowsize * length))
            ^
8259.     buffsize = (colsize + 1) * width;
8260.   else

tools/tiffcrop.c:8259:5: 
8257.   colsize = ((bps * spp * length) + 7) / 8;
8258.   if ((colsize * width) > (rowsize * length))
8259.     buffsize = (colsize + 1) * width;
          ^
8260.   else
8261.     buffsize = (rowsize + 1) * length;

tools/tiffcrop.c:8263:3: 
8261.     buffsize = (rowsize + 1) * length;
8262. 
8263.   bytes_per_sample = (bps + 7) / 8;
        ^
8264.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8265.   if (bytes_per_pixel < (bytes_per_sample + 1))

tools/tiffcrop.c:8264:3: 
8262. 
8263.   bytes_per_sample = (bps + 7) / 8;
8264.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
        ^
8265.   if (bytes_per_pixel < (bytes_per_sample + 1))
8266.     shift_width = bytes_per_pixel;

tools/tiffcrop.c:8265:7: Taking false branch
8263.   bytes_per_sample = (bps + 7) / 8;
8264.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8265.   if (bytes_per_pixel < (bytes_per_sample + 1))
            ^
8266.     shift_width = bytes_per_pixel;
8267.   else

tools/tiffcrop.c:8268:5: 
8266.     shift_width = bytes_per_pixel;
8267.   else
8268.     shift_width = bytes_per_sample + 1;
          ^
8269. 
8270.   switch (rotation)

tools/tiffcrop.c:8270:3: 
8268.     shift_width = bytes_per_sample + 1;
8269. 
8270.   switch (rotation)
        ^
8271.     {
8272.     case 0:

tools/tiffcrop.c:8272:5: Switch condition is false. Skipping switch case
8270.   switch (rotation)
8271.     {
8272.     case 0:
          ^
8273.     case 360: return (0);
8274.     case 90:

tools/tiffcrop.c:8273:5: Switch condition is false. Skipping switch case
8271.     {
8272.     case 0:
8273.     case 360: return (0);
          ^
8274.     case 90:
8275.     case 180:

tools/tiffcrop.c:8274:5: Switch condition is false. Skipping switch case
8272.     case 0:
8273.     case 360: return (0);
8274.     case 90:
          ^
8275.     case 180:
8276.     case 270: break;

tools/tiffcrop.c:8275:5: Switch condition is true. Entering switch case
8273.     case 360: return (0);
8274.     case 90:
8275.     case 180:
          ^
8276.     case 270: break;
8277.     default:  TIFFError("rotateImage", "Invalid rotation angle %d", rotation);

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

tools/tiffcrop.c:8286:3: 
8284.     return (-1);
8285.     }
8286.   _TIFFmemset(rbuff, '\0', buffsize);
        ^
8287. 
8288.   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:8288:3: 
8286.   _TIFFmemset(rbuff, '\0', buffsize);
8287. 
8288.   ibuff = *ibuff_ptr;
        ^
8289.   switch (rotation)
8290.     {

tools/tiffcrop.c:8289:3: 
8287. 
8288.   ibuff = *ibuff_ptr;
8289.   switch (rotation)
        ^
8290.     {
8291.     case 180: if ((bps % 8) == 0) /* byte alligned data */

tools/tiffcrop.c:8291:5: Switch condition is false. Skipping switch case
8289.   switch (rotation)
8290.     {
8291.     case 180: if ((bps % 8) == 0) /* byte alligned data */
          ^
8292.                 { 
8293.                 src = ibuff;

tools/tiffcrop.c:8357:5: Switch condition is false. Skipping switch case
8355.               break;
8356. 
8357.     case 90:  if ((bps % 8) == 0) /* byte aligned data */
          ^
8358.                 {
8359.                 for (col = 0; col < width; col++)

tools/tiffcrop.c:8434:5: Switch condition is false. Skipping switch case
8432. 	      break;
8433. 
8434.     case 270: if ((bps % 8) == 0) /* byte aligned data */
          ^
8435.                 {
8436.                 for (col = 0; col < width; col++)
