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

tools/tiffcrop.c:8204:1: start of procedure rotateImage()
8202. 
8203. /* Rotate an image by a multiple of 90 degrees clockwise */
8204. static int
      ^
8205. rotateImage(uint16 rotation, struct image_data *image, uint32 *img_width, 
8206.             uint32 *img_length, unsigned char **ibuff_ptr)

tools/tiffcrop.c:8218:3: 
8216.   uint16   spp, bps;
8217.   float    res_temp;
8218.   unsigned char *rbuff = NULL;
        ^
8219. 
8220.   width  = *img_width;

tools/tiffcrop.c:8220:3: 
8218.   unsigned char *rbuff = NULL;
8219. 
8220.   width  = *img_width;
        ^
8221.   length = *img_length;
8222.   spp = image->spp;

tools/tiffcrop.c:8221:3: 
8219. 
8220.   width  = *img_width;
8221.   length = *img_length;
        ^
8222.   spp = image->spp;
8223.   bps = image->bps;

tools/tiffcrop.c:8222:3: 
8220.   width  = *img_width;
8221.   length = *img_length;
8222.   spp = image->spp;
        ^
8223.   bps = image->bps;
8224. 

tools/tiffcrop.c:8223:3: 
8221.   length = *img_length;
8222.   spp = image->spp;
8223.   bps = image->bps;
        ^
8224. 
8225.   rowsize = ((bps * spp * width) + 7) / 8;

tools/tiffcrop.c:8225:3: 
8223.   bps = image->bps;
8224. 
8225.   rowsize = ((bps * spp * width) + 7) / 8;
        ^
8226.   colsize = ((bps * spp * length) + 7) / 8;
8227.   if ((colsize * width) > (rowsize * length))

tools/tiffcrop.c:8226:3: 
8224. 
8225.   rowsize = ((bps * spp * width) + 7) / 8;
8226.   colsize = ((bps * spp * length) + 7) / 8;
        ^
8227.   if ((colsize * width) > (rowsize * length))
8228.     buffsize = (colsize + 1) * width;

tools/tiffcrop.c:8227:7: Taking true branch
8225.   rowsize = ((bps * spp * width) + 7) / 8;
8226.   colsize = ((bps * spp * length) + 7) / 8;
8227.   if ((colsize * width) > (rowsize * length))
            ^
8228.     buffsize = (colsize + 1) * width;
8229.   else

tools/tiffcrop.c:8228:5: 
8226.   colsize = ((bps * spp * length) + 7) / 8;
8227.   if ((colsize * width) > (rowsize * length))
8228.     buffsize = (colsize + 1) * width;
          ^
8229.   else
8230.     buffsize = (rowsize + 1) * length;

tools/tiffcrop.c:8232:3: 
8230.     buffsize = (rowsize + 1) * length;
8231. 
8232.   bytes_per_sample = (bps + 7) / 8;
        ^
8233.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8234.   if (bytes_per_pixel < (bytes_per_sample + 1))

tools/tiffcrop.c:8233:3: 
8231. 
8232.   bytes_per_sample = (bps + 7) / 8;
8233.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
        ^
8234.   if (bytes_per_pixel < (bytes_per_sample + 1))
8235.     shift_width = bytes_per_pixel;

tools/tiffcrop.c:8234:7: Taking false branch
8232.   bytes_per_sample = (bps + 7) / 8;
8233.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8234.   if (bytes_per_pixel < (bytes_per_sample + 1))
            ^
8235.     shift_width = bytes_per_pixel;
8236.   else

tools/tiffcrop.c:8237:5: 
8235.     shift_width = bytes_per_pixel;
8236.   else
8237.     shift_width = bytes_per_sample + 1;
          ^
8238. 
8239.   switch (rotation)

tools/tiffcrop.c:8239:3: 
8237.     shift_width = bytes_per_sample + 1;
8238. 
8239.   switch (rotation)
        ^
8240.     {
8241.     case 0:

tools/tiffcrop.c:8241:5: Switch condition is false. Skipping switch case
8239.   switch (rotation)
8240.     {
8241.     case 0:
          ^
8242.     case 360: return (0);
8243.     case 90:

tools/tiffcrop.c:8242:5: Switch condition is false. Skipping switch case
8240.     {
8241.     case 0:
8242.     case 360: return (0);
          ^
8243.     case 90:
8244.     case 180:

tools/tiffcrop.c:8243:5: Switch condition is false. Skipping switch case
8241.     case 0:
8242.     case 360: return (0);
8243.     case 90:
          ^
8244.     case 180:
8245.     case 270: break;

tools/tiffcrop.c:8244:5: Switch condition is true. Entering switch case
8242.     case 360: return (0);
8243.     case 90:
8244.     case 180:
          ^
8245.     case 270: break;
8246.     default:  TIFFError("rotateImage", "Invalid rotation angle %d", rotation);

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

tools/tiffcrop.c:8255:3: 
8253.     return (-1);
8254.     }
8255.   _TIFFmemset(rbuff, '\0', buffsize);
        ^
8256. 
8257.   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:8257:3: 
8255.   _TIFFmemset(rbuff, '\0', buffsize);
8256. 
8257.   ibuff = *ibuff_ptr;
        ^
8258.   switch (rotation)
8259.     {

tools/tiffcrop.c:8258:3: 
8256. 
8257.   ibuff = *ibuff_ptr;
8258.   switch (rotation)
        ^
8259.     {
8260.     case 180: if ((bps % 8) == 0) /* byte alligned data */

tools/tiffcrop.c:8260:5: Switch condition is false. Skipping switch case
8258.   switch (rotation)
8259.     {
8260.     case 180: if ((bps % 8) == 0) /* byte alligned data */
          ^
8261.                 { 
8262.                 src = ibuff;

tools/tiffcrop.c:8326:5: Switch condition is false. Skipping switch case
8324.               break;
8325. 
8326.     case 90:  if ((bps % 8) == 0) /* byte aligned data */
          ^
8327.                 {
8328.                 for (col = 0; col < width; col++)

tools/tiffcrop.c:8403:5: Switch condition is false. Skipping switch case
8401. 	      break;
8402. 
8403.     case 270: if ((bps % 8) == 0) /* byte aligned data */
          ^
8404.                 {
8405.                 for (col = 0; col < width; col++)
