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

tools/tiffcrop.c:8020:1: start of procedure rotateImage()
8018. 
8019. /* Rotate an image by a multiple of 90 degrees clockwise */
8020. static int
      ^
8021. rotateImage(uint16 rotation, struct image_data *image, uint32 *img_width, 
8022.             uint32 *img_length, unsigned char **ibuff_ptr)

tools/tiffcrop.c:8034:3: 
8032.   uint16   spp, bps;
8033.   float    res_temp;
8034.   unsigned char *rbuff = NULL;
        ^
8035. 
8036.   width  = *img_width;

tools/tiffcrop.c:8036:3: 
8034.   unsigned char *rbuff = NULL;
8035. 
8036.   width  = *img_width;
        ^
8037.   length = *img_length;
8038.   spp = image->spp;

tools/tiffcrop.c:8037:3: 
8035. 
8036.   width  = *img_width;
8037.   length = *img_length;
        ^
8038.   spp = image->spp;
8039.   bps = image->bps;

tools/tiffcrop.c:8038:3: 
8036.   width  = *img_width;
8037.   length = *img_length;
8038.   spp = image->spp;
        ^
8039.   bps = image->bps;
8040. 

tools/tiffcrop.c:8039:3: 
8037.   length = *img_length;
8038.   spp = image->spp;
8039.   bps = image->bps;
        ^
8040. 
8041.   rowsize = ((bps * spp * width) + 7) / 8;

tools/tiffcrop.c:8041:3: 
8039.   bps = image->bps;
8040. 
8041.   rowsize = ((bps * spp * width) + 7) / 8;
        ^
8042.   colsize = ((bps * spp * length) + 7) / 8;
8043.   if ((colsize * width) > (rowsize * length))

tools/tiffcrop.c:8042:3: 
8040. 
8041.   rowsize = ((bps * spp * width) + 7) / 8;
8042.   colsize = ((bps * spp * length) + 7) / 8;
        ^
8043.   if ((colsize * width) > (rowsize * length))
8044.     buffsize = (colsize + 1) * width;

tools/tiffcrop.c:8043:7: Taking true branch
8041.   rowsize = ((bps * spp * width) + 7) / 8;
8042.   colsize = ((bps * spp * length) + 7) / 8;
8043.   if ((colsize * width) > (rowsize * length))
            ^
8044.     buffsize = (colsize + 1) * width;
8045.   else

tools/tiffcrop.c:8044:5: 
8042.   colsize = ((bps * spp * length) + 7) / 8;
8043.   if ((colsize * width) > (rowsize * length))
8044.     buffsize = (colsize + 1) * width;
          ^
8045.   else
8046.     buffsize = (rowsize + 1) * length;

tools/tiffcrop.c:8048:3: 
8046.     buffsize = (rowsize + 1) * length;
8047. 
8048.   bytes_per_sample = (bps + 7) / 8;
        ^
8049.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8050.   if (bytes_per_pixel < (bytes_per_sample + 1))

tools/tiffcrop.c:8049:3: 
8047. 
8048.   bytes_per_sample = (bps + 7) / 8;
8049.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
        ^
8050.   if (bytes_per_pixel < (bytes_per_sample + 1))
8051.     shift_width = bytes_per_pixel;

tools/tiffcrop.c:8050:7: Taking false branch
8048.   bytes_per_sample = (bps + 7) / 8;
8049.   bytes_per_pixel  = ((bps * spp) + 7) / 8;
8050.   if (bytes_per_pixel < (bytes_per_sample + 1))
            ^
8051.     shift_width = bytes_per_pixel;
8052.   else

tools/tiffcrop.c:8053:5: 
8051.     shift_width = bytes_per_pixel;
8052.   else
8053.     shift_width = bytes_per_sample + 1;
          ^
8054. 
8055.   switch (rotation)

tools/tiffcrop.c:8055:3: 
8053.     shift_width = bytes_per_sample + 1;
8054. 
8055.   switch (rotation)
        ^
8056.     {
8057.     case 0:

tools/tiffcrop.c:8057:5: Switch condition is false. Skipping switch case
8055.   switch (rotation)
8056.     {
8057.     case 0:
          ^
8058.     case 360: return (0);
8059.     case 90:

tools/tiffcrop.c:8058:5: Switch condition is false. Skipping switch case
8056.     {
8057.     case 0:
8058.     case 360: return (0);
          ^
8059.     case 90:
8060.     case 180:

tools/tiffcrop.c:8059:5: Switch condition is false. Skipping switch case
8057.     case 0:
8058.     case 360: return (0);
8059.     case 90:
          ^
8060.     case 180:
8061.     case 270: break;

tools/tiffcrop.c:8060:5: Switch condition is true. Entering switch case
8058.     case 360: return (0);
8059.     case 90:
8060.     case 180:
          ^
8061.     case 270: break;
8062.     default:  TIFFError("rotateImage", "Invalid rotation angle %d", rotation);

tools/tiffcrop.c:8066:9: 
8064.     }
8065. 
8066.   if (!(rbuff = (unsigned char *)_TIFFmalloc(buffsize)))
              ^
8067.     {
8068.     TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize);

libtiff/tif_unix.c:253:1: start of procedure _TIFFmalloc()
  251. #endif
  252. 
  253. void*
       ^
  254. _TIFFmalloc(tmsize_t s)
  255. {

libtiff/tif_unix.c:256:2: 
  254. _TIFFmalloc(tmsize_t s)
  255. {
  256. 	return (malloc((size_t) s));
        ^
  257. }
  258. 

libtiff/tif_unix.c:257:1: return from a call to _TIFFmalloc
  255. {
  256. 	return (malloc((size_t) s));
  257. }
       ^
  258. 
  259. void

tools/tiffcrop.c:8066:9: Taking false branch
8064.     }
8065. 
8066.   if (!(rbuff = (unsigned char *)_TIFFmalloc(buffsize)))
              ^
8067.     {
8068.     TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize);

tools/tiffcrop.c:8071:3: 
8069.     return (-1);
8070.     }
8071.   _TIFFmemset(rbuff, '\0', buffsize);
        ^
8072. 
8073.   ibuff = *ibuff_ptr;

libtiff/tif_unix.c:271:1: start of procedure _TIFFmemset()
  269. }
  270. 
  271. void
       ^
  272. _TIFFmemset(void* p, int v, tmsize_t c)
  273. {

libtiff/tif_unix.c:274:2: 
  272. _TIFFmemset(void* p, int v, tmsize_t c)
  273. {
  274. 	memset(p, v, (size_t) c);
        ^
  275. }
  276. 

libtiff/tif_unix.c:275:1: return from a call to _TIFFmemset
  273. {
  274. 	memset(p, v, (size_t) c);
  275. }
       ^
  276. 
  277. void

tools/tiffcrop.c:8073:3: 
8071.   _TIFFmemset(rbuff, '\0', buffsize);
8072. 
8073.   ibuff = *ibuff_ptr;
        ^
8074.   switch (rotation)
8075.     {

tools/tiffcrop.c:8074:3: 
8072. 
8073.   ibuff = *ibuff_ptr;
8074.   switch (rotation)
        ^
8075.     {
8076.     case 180: if ((bps % 8) == 0) /* byte alligned data */

tools/tiffcrop.c:8076:5: Switch condition is false. Skipping switch case
8074.   switch (rotation)
8075.     {
8076.     case 180: if ((bps % 8) == 0) /* byte alligned data */
          ^
8077.                 { 
8078.                 src = ibuff;

tools/tiffcrop.c:8142:5: Switch condition is false. Skipping switch case
8140.               break;
8141. 
8142.     case 90:  if ((bps % 8) == 0) /* byte aligned data */
          ^
8143.                 {
8144.                 for (col = 0; col < width; col++)

tools/tiffcrop.c:8219:5: Switch condition is false. Skipping switch case
8217. 	      break;
8218. 
8219.     case 270: if ((bps % 8) == 0) /* byte aligned data */
          ^
8220.                 {
8221.                 for (col = 0; col < width; col++)
