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


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

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

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

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

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

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

crypto/asn1/a_utctm.c:69:1: start of procedure ASN1_UTCTIME_new()
  67.   #include <openssl/asn1.h>
  68.   
  69. > ASN1_UTCTIME *ASN1_UTCTIME_new(void)
  70.   { return M_ASN1_UTCTIME_new(); }
  71.   

crypto/asn1/a_utctm.c:70:3: 
  68.   
  69.   ASN1_UTCTIME *ASN1_UTCTIME_new(void)
  70. > { return M_ASN1_UTCTIME_new(); }
  71.   
  72.   void ASN1_UTCTIME_free(ASN1_UTCTIME *x)

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)

crypto/asn1/a_utctm.c:70:32: return from a call to ASN1_UTCTIME_new
  68.   
  69.   ASN1_UTCTIME *ASN1_UTCTIME_new(void)
  70.   { return M_ASN1_UTCTIME_new(); }
                                       ^
  71.   
  72.   void ASN1_UTCTIME_free(ASN1_UTCTIME *x)

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

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