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

tools/tiff2pdf.c:4051:1: start of procedure t2p_pdf_tifftime()
4049.  */
4050. 
4051. void t2p_pdf_tifftime(T2P* t2p, TIFF* input){
      ^
4052. 
4053. 	char* datetime;

tools/tiff2pdf.c:4055:2: 
4053. 	char* datetime;
4054. 
4055. 	t2p->pdf_datetime = (unsigned char*) _TIFFmalloc(19);
       ^
4056. 	if(t2p->pdf_datetime == NULL){
4057. 		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:4056:5: Taking false branch
4054. 
4055. 	t2p->pdf_datetime = (unsigned char*) _TIFFmalloc(19);
4056. 	if(t2p->pdf_datetime == NULL){
          ^
4057. 		TIFFError(TIFF2PDF_MODULE, 
4058. 		"Can't allocate %u bytes of memory for t2p_pdf_tiff_time", 17); 

tools/tiff2pdf.c:4062:2: 
4060. 		return;
4061. 	}
4062. 	t2p->pdf_datetime[16] = '\0';
       ^
4063. 	if( TIFFGetField(input, TIFFTAG_DATETIME, &datetime) != 0 
4064. 	    && (strlen(datetime) >= 19) ){

tools/tiff2pdf.c:4063:6: 
4061. 	}
4062. 	t2p->pdf_datetime[16] = '\0';
4063. 	if( TIFFGetField(input, TIFFTAG_DATETIME, &datetime) != 0 
           ^
4064. 	    && (strlen(datetime) >= 19) ){
4065. 		t2p->pdf_datetime[0]='D';

libtiff/tif_dir.c:1029:1: start of procedure TIFFGetField()
  1027.  * internal directory structure.
  1028.  */
  1029. int
        ^
  1030. TIFFGetField(TIFF* tif, uint32 tag, ...)
  1031. {

libtiff/tif_dir.c:1035:2: 
  1033. 	va_list ap;
  1034. 
  1035. 	va_start(ap, tag);
         ^
  1036. 	status = TIFFVGetField(tif, tag, ap);
  1037. 	va_end(ap);

libtiff/tif_dir.c:1036:2: Skipping TIFFVGetField(): empty list of specs
  1034. 
  1035. 	va_start(ap, tag);
  1036. 	status = TIFFVGetField(tif, tag, ap);
         ^
  1037. 	va_end(ap);
  1038. 	return (status);

libtiff/tif_dir.c:1037:2: 
  1035. 	va_start(ap, tag);
  1036. 	status = TIFFVGetField(tif, tag, ap);
  1037. 	va_end(ap);
         ^
  1038. 	return (status);
  1039. }

libtiff/tif_dir.c:1038:2: 
  1036. 	status = TIFFVGetField(tif, tag, ap);
  1037. 	va_end(ap);
  1038. 	return (status);
         ^
  1039. }
  1040. 

libtiff/tif_dir.c:1039:1: return from a call to TIFFGetField
  1037. 	va_end(ap);
  1038. 	return (status);
  1039. }
        ^
  1040. 
  1041. /*

tools/tiff2pdf.c:4063:6: Taking false branch
4061. 	}
4062. 	t2p->pdf_datetime[16] = '\0';
4063. 	if( TIFFGetField(input, TIFFTAG_DATETIME, &datetime) != 0 
           ^
4064. 	    && (strlen(datetime) >= 19) ){
4065. 		t2p->pdf_datetime[0]='D';

tools/tiff2pdf.c:4082:3: Skipping t2p_pdf_currenttime(): empty list of specs
4080. 		t2p->pdf_datetime[15]=datetime[18];
4081. 	} else {
4082. 		t2p_pdf_currenttime(t2p);
        ^
4083. 	}
4084. 

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}']