tools/tiff2pdf.c:4089: error: Memory Leak
  memory dynamically allocated by call to `_TIFFmalloc()` at line 4062, column 39 is not reachable after line 4089, column 3.

tools/tiff2pdf.c:4058:1: start of procedure t2p_pdf_tifftime()
4056.  */
4057. 
4058. void t2p_pdf_tifftime(T2P* t2p, TIFF* input){
      ^
4059. 
4060. 	char* datetime;

tools/tiff2pdf.c:4062:2: 
4060. 	char* datetime;
4061. 
4062. 	t2p->pdf_datetime = (unsigned char*) _TIFFmalloc(19);
       ^
4063. 	if(t2p->pdf_datetime == NULL){
4064. 		TIFFError(TIFF2PDF_MODULE, 

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/tiff2pdf.c:4063:5: Taking false branch
4061. 
4062. 	t2p->pdf_datetime = (unsigned char*) _TIFFmalloc(19);
4063. 	if(t2p->pdf_datetime == NULL){
          ^
4064. 		TIFFError(TIFF2PDF_MODULE, 
4065. 		"Can't allocate %u bytes of memory for t2p_pdf_tiff_time", 17); 

tools/tiff2pdf.c:4069:2: 
4067. 		return;
4068. 	}
4069. 	t2p->pdf_datetime[16] = '\0';
       ^
4070. 	if( TIFFGetField(input, TIFFTAG_DATETIME, &datetime) != 0 
4071. 	    && (strlen(datetime) >= 19) ){

tools/tiff2pdf.c:4070:6: 
4068. 	}
4069. 	t2p->pdf_datetime[16] = '\0';
4070. 	if( TIFFGetField(input, TIFFTAG_DATETIME, &datetime) != 0 
           ^
4071. 	    && (strlen(datetime) >= 19) ){
4072. 		t2p->pdf_datetime[0]='D';

libtiff/tif_dir.c:1048:1: start of procedure TIFFGetField()
  1046.  * internal directory structure.
  1047.  */
  1048. int
        ^
  1049. TIFFGetField(TIFF* tif, uint32 tag, ...)
  1050. {

libtiff/tif_dir.c:1054:2: 
  1052. 	va_list ap;
  1053. 
  1054. 	va_start(ap, tag);
         ^
  1055. 	status = TIFFVGetField(tif, tag, ap);
  1056. 	va_end(ap);

libtiff/tif_dir.c:1055:2: Skipping TIFFVGetField(): empty list of specs
  1053. 
  1054. 	va_start(ap, tag);
  1055. 	status = TIFFVGetField(tif, tag, ap);
         ^
  1056. 	va_end(ap);
  1057. 	return (status);

libtiff/tif_dir.c:1056:2: 
  1054. 	va_start(ap, tag);
  1055. 	status = TIFFVGetField(tif, tag, ap);
  1056. 	va_end(ap);
         ^
  1057. 	return (status);
  1058. }

libtiff/tif_dir.c:1057:2: 
  1055. 	status = TIFFVGetField(tif, tag, ap);
  1056. 	va_end(ap);
  1057. 	return (status);
         ^
  1058. }
  1059. 

libtiff/tif_dir.c:1058:1: return from a call to TIFFGetField
  1056. 	va_end(ap);
  1057. 	return (status);
  1058. }
        ^
  1059. 
  1060. /*

tools/tiff2pdf.c:4070:6: Taking false branch
4068. 	}
4069. 	t2p->pdf_datetime[16] = '\0';
4070. 	if( TIFFGetField(input, TIFFTAG_DATETIME, &datetime) != 0 
           ^
4071. 	    && (strlen(datetime) >= 19) ){
4072. 		t2p->pdf_datetime[0]='D';

tools/tiff2pdf.c:4089:3: Skipping t2p_pdf_currenttime(): empty list of specs
4087. 		t2p->pdf_datetime[15]=datetime[18];
4088. 	} else {
4089. 		t2p_pdf_currenttime(t2p);
        ^
4090. 	}
4091. 

void t2p_pdf_tifftime(T2P* t2p, TIFF* input){
	char* datetime;
	t2p->pdf_datetime = (unsigned char*) _TIFFmalloc(19);
	if(t2p->pdf_datetime == NULL){
		TIFFError(TIFF2PDF_MODULE,
		"Can't allocate %u bytes of memory for t2p_pdf_tiff_time", 17);
		t2p->t2p_error = T2P_ERR_ERROR;
		return;
	}
	t2p->pdf_datetime[16] = '\0';
	if( TIFFGetField(input, TIFFTAG_DATETIME, &datetime) != 0
	    && (strlen(datetime) >= 19) ){
		t2p->pdf_datetime[0]='D';
		t2p->pdf_datetime[1]=':';
		t2p->pdf_datetime[2]=datetime[0];
		t2p->pdf_datetime[3]=datetime[1];
		t2p->pdf_datetime[4]=datetime[2];
		t2p->pdf_datetime[5]=datetime[3];
		t2p->pdf_datetime[6]=datetime[5];
		t2p->pdf_datetime[7]=datetime[6];
		t2p->pdf_datetime[8]=datetime[8];
		t2p->pdf_datetime[9]=datetime[9];
		t2p->pdf_datetime[10]=datetime[11];
		t2p->pdf_datetime[11]=datetime[12];
		t2p->pdf_datetime[12]=datetime[14];
		t2p->pdf_datetime[13]=datetime[15];
		t2p->pdf_datetime[14]=datetime[17];
		t2p->pdf_datetime[15]=datetime[18];
	} else {
		t2p_pdf_currenttime(t2p);
	}
	return;
}
['void t2p_pdf_tifftime(T2P* t2p, TIFF* input){\n\tchar* datetime;\n\tt2p->pdf_datetime = (unsigned char*) _TIFFmalloc(19);\n\tif(t2p->pdf_datetime == NULL){\n\t\tTIFFError(TIFF2PDF_MODULE,\n\t\t"Can\'t allocate %u bytes of memory for t2p_pdf_tiff_time", 17);\n\t\tt2p->t2p_error = T2P_ERR_ERROR;\n\t\treturn;\n\t}\n\tt2p->pdf_datetime[16] = \'\\0\';\n\tif( TIFFGetField(input, TIFFTAG_DATETIME, &datetime) != 0\n\t    && (strlen(datetime) >= 19) ){\n\t\tt2p->pdf_datetime[0]=\'D\';\n\t\tt2p->pdf_datetime[1]=\':\';\n\t\tt2p->pdf_datetime[2]=datetime[0];\n\t\tt2p->pdf_datetime[3]=datetime[1];\n\t\tt2p->pdf_datetime[4]=datetime[2];\n\t\tt2p->pdf_datetime[5]=datetime[3];\n\t\tt2p->pdf_datetime[6]=datetime[5];\n\t\tt2p->pdf_datetime[7]=datetime[6];\n\t\tt2p->pdf_datetime[8]=datetime[8];\n\t\tt2p->pdf_datetime[9]=datetime[9];\n\t\tt2p->pdf_datetime[10]=datetime[11];\n\t\tt2p->pdf_datetime[11]=datetime[12];\n\t\tt2p->pdf_datetime[12]=datetime[14];\n\t\tt2p->pdf_datetime[13]=datetime[15];\n\t\tt2p->pdf_datetime[14]=datetime[17];\n\t\tt2p->pdf_datetime[15]=datetime[18];\n\t} else {\n\t\tt2p_pdf_currenttime(t2p);\n\t}\n\treturn;\n}', 'void*\n_TIFFmalloc(tmsize_t s)\n{\n\treturn (malloc((size_t) s));\n}', 'int\nTIFFGetField(TIFF* tif, uint32 tag, ...)\n{\n\tint status;\n\tva_list ap;\n\tva_start(ap, tag);\n\tstatus = TIFFVGetField(tif, tag, ap);\n\tva_end(ap);\n\treturn (status);\n}']