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


apps/ca.c:1481:1: start of procedure do_body()
1479.   	}
1480.   
1481. > static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
1482.   	     STACK_OF(CONF_VALUE) *policy, TXT_DB *db, BIGNUM *serial,
1483.   	     char *startdate, char *enddate, int days, int batch, int verbose,

apps/ca.c:1486:2: 
1484.   	     X509_REQ *req, char *ext_sect, LHASH *lconf)
1485.   	{
1486. > 	X509_NAME *name=NULL,*CAname=NULL,*subject=NULL;
1487.   	ASN1_UTCTIME *tm,*tmptm;
1488.   	ASN1_STRING *str,*str2;

apps/ca.c:1490:2: 
1488.   	ASN1_STRING *str,*str2;
1489.   	ASN1_OBJECT *obj;
1490. > 	X509 *ret=NULL;
1491.   	X509_CINF *ci;
1492.   	X509_NAME_ENTRY *ne;

apps/ca.c:1495:2: 
1493.   	X509_NAME_ENTRY *tne,*push;
1494.   	EVP_PKEY *pktmp;
1495. > 	int ok= -1,i,j,last,nid;
1496.   	char *p;
1497.   	CONF_VALUE *cv;

apps/ca.c:1498:2: 
1496.   	char *p;
1497.   	CONF_VALUE *cv;
1498. > 	char *row[DB_NUMBER],**rrow,**irow=NULL;
1499.   	char buf[25],*pbuf;
1500.   

apps/ca.c:1501:2: 
1499.   	char buf[25],*pbuf;
1500.   
1501. > 	tmptm=ASN1_UTCTIME_new();
1502.   	if (tmptm == NULL)
1503.   		{

crypto/asn1/asn1_lib.c:364:1: start of procedure ASN1_STRING_type_new()
  362.   
  363.   
  364. > ASN1_STRING *ASN1_STRING_type_new(int type)
  365.   	{
  366.   	ASN1_STRING *ret;

crypto/asn1/asn1_lib.c:368:2: 
  366.   	ASN1_STRING *ret;
  367.   
  368. > 	ret=(ASN1_STRING *)Malloc(sizeof(ASN1_STRING));
  369.   	if (ret == NULL)
  370.   		{

crypto/asn1/asn1_lib.c:369:6: Taking false branch
  367.   
  368.   	ret=(ASN1_STRING *)Malloc(sizeof(ASN1_STRING));
  369.   	if (ret == NULL)
              ^
  370.   		{
  371.   		ASN1err(ASN1_F_ASN1_STRING_TYPE_NEW,ERR_R_MALLOC_FAILURE);

crypto/asn1/asn1_lib.c:374:2: 
  372.   		return(NULL);
  373.   		}
  374. > 	ret->length=0;
  375.   	ret->type=type;
  376.   	ret->data=NULL;

crypto/asn1/asn1_lib.c:375:2: 
  373.   		}
  374.   	ret->length=0;
  375. > 	ret->type=type;
  376.   	ret->data=NULL;
  377.   	ret->flags=0;

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

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

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

crypto/asn1/asn1_lib.c:379:2: return from a call to ASN1_STRING_type_new
  377.   	ret->flags=0;
  378.   	return(ret);
  379.   	}
          ^
  380.   
  381.   void ASN1_STRING_free(ASN1_STRING *a)

apps/ca.c:1502:6: Taking false branch
1500.   
1501.   	tmptm=ASN1_UTCTIME_new();
1502.   	if (tmptm == NULL)
             ^
1503.   		{
1504.   		BIO_printf(bio_err,"malloc error\n");

apps/ca.c:1508:7: 
1506.   		}
1507.   
1508. > 	for (i=0; i<DB_NUMBER; i++)
1509.   		row[i]=NULL;
1510.   
