apps/ca.c:1443: error: MEMORY_LEAK
  memory dynamically allocated to `i` by call to `ASN1_STRING_type_new()` at line 1436, column 8 is not reachable after line 1443, column 7.
Showing all 17 steps of the trace


apps/ca.c:1417:1: start of procedure do_body()
1415.   	}
1416.   
1417. > static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
1418.   	     STACK *policy, TXT_DB *db, BIGNUM *serial, char *startdate, int days,
1419.   	     int batch, int verbose, X509_REQ *req, char *ext_sect, LHASH *lconf)

apps/ca.c:1421:2: 
1419.   	     int batch, int verbose, X509_REQ *req, char *ext_sect, LHASH *lconf)
1420.   	{
1421. > 	X509_NAME *name=NULL,*CAname=NULL,*subject=NULL;
1422.   	ASN1_UTCTIME *tm,*tmptm;
1423.   	ASN1_STRING *str,*str2;

apps/ca.c:1425:2: 
1423.   	ASN1_STRING *str,*str2;
1424.   	ASN1_OBJECT *obj;
1425. > 	X509 *ret=NULL;
1426.   	X509_CINF *ci;
1427.   	X509_NAME_ENTRY *ne;

apps/ca.c:1430:2: 
1428.   	X509_NAME_ENTRY *tne,*push;
1429.   	EVP_PKEY *pktmp;
1430. > 	int ok= -1,i,j,last,nid;
1431.   	char *p;
1432.   	CONF_VALUE *cv;

apps/ca.c:1433:2: 
1431.   	char *p;
1432.   	CONF_VALUE *cv;
1433. > 	char *row[DB_NUMBER],**rrow,**irow=NULL;
1434.   	char buf[25],*pbuf;
1435.   

apps/ca.c:1436:2: 
1434.   	char buf[25],*pbuf;
1435.   
1436. > 	tmptm=ASN1_UTCTIME_new();
1437.   	if (tmptm == NULL)
1438.   		{

crypto/asn1/asn1_lib.c:368:1: start of procedure ASN1_STRING_type_new()
  366.   
  367.   
  368. > ASN1_STRING *ASN1_STRING_type_new(int type)
  369.   	{
  370.   	ASN1_STRING *ret;

crypto/asn1/asn1_lib.c:372:2: 
  370.   	ASN1_STRING *ret;
  371.   
  372. > 	ret=(ASN1_STRING *)Malloc(sizeof(ASN1_STRING));
  373.   	if (ret == NULL)
  374.   		{

crypto/asn1/asn1_lib.c:373:6: Taking false branch
  371.   
  372.   	ret=(ASN1_STRING *)Malloc(sizeof(ASN1_STRING));
  373.   	if (ret == NULL)
              ^
  374.   		{
  375.   		ASN1err(ASN1_F_ASN1_STRING_TYPE_NEW,ERR_R_MALLOC_FAILURE);

crypto/asn1/asn1_lib.c:378:2: 
  376.   		return(NULL);
  377.   		}
  378. > 	ret->length=0;
  379.   	ret->type=type;
  380.   	ret->data=NULL;

crypto/asn1/asn1_lib.c:379:2: 
  377.   		}
  378.   	ret->length=0;
  379. > 	ret->type=type;
  380.   	ret->data=NULL;
  381.   	ret->flags=0;

crypto/asn1/asn1_lib.c:380:2: 
  378.   	ret->length=0;
  379.   	ret->type=type;
  380. > 	ret->data=NULL;
  381.   	ret->flags=0;
  382.   	return(ret);

crypto/asn1/asn1_lib.c:381:2: 
  379.   	ret->type=type;
  380.   	ret->data=NULL;
  381. > 	ret->flags=0;
  382.   	return(ret);
  383.   	}

crypto/asn1/asn1_lib.c:382:2: 
  380.   	ret->data=NULL;
  381.   	ret->flags=0;
  382. > 	return(ret);
  383.   	}
  384.   

crypto/asn1/asn1_lib.c:383:2: return from a call to ASN1_STRING_type_new
  381.   	ret->flags=0;
  382.   	return(ret);
  383.   	}
          ^
  384.   
  385.   void ASN1_STRING_free(ASN1_STRING *a)

apps/ca.c:1437:6: Taking false branch
1435.   
1436.   	tmptm=ASN1_UTCTIME_new();
1437.   	if (tmptm == NULL)
             ^
1438.   		{
1439.   		BIO_printf(bio_err,"malloc error\n");

apps/ca.c:1443:7: 
1441.   		}
1442.   
1443. > 	for (i=0; i<DB_NUMBER; i++)
1444.   		row[i]=NULL;
1445.   
