crypto/asn1/x_cinf.c:168: error: MEMORY_LEAK
  memory dynamically allocated to `return` by call to `malloc()` at line 164, column 2 is not reachable after line 168, column 2.
Showing all 31 steps of the trace


crypto/asn1/x_cinf.c:159:1: start of procedure X509_CINF_new()
157.   	}
158.   
159. > X509_CINF *X509_CINF_new(void)
160.   	{
161.   	X509_CINF *ret=NULL;

crypto/asn1/x_cinf.c:161:2: 
159.   X509_CINF *X509_CINF_new(void)
160.   	{
161. > 	X509_CINF *ret=NULL;
162.   	ASN1_CTX c;
163.   

crypto/asn1/x_cinf.c:164:2: Taking false branch
162.   	ASN1_CTX c;
163.   
164.   	M_ASN1_New_Malloc(ret,X509_CINF);
        ^
165.   	ret->version=NULL;
166.   	M_ASN1_New(ret->serialNumber,ASN1_INTEGER_new);

crypto/asn1/x_cinf.c:165:2: 
163.   
164.   	M_ASN1_New_Malloc(ret,X509_CINF);
165. > 	ret->version=NULL;
166.   	M_ASN1_New(ret->serialNumber,ASN1_INTEGER_new);
167.   	M_ASN1_New(ret->signature,X509_ALGOR_new);

crypto/asn1/x_cinf.c:166:2: 
164.   	M_ASN1_New_Malloc(ret,X509_CINF);
165.   	ret->version=NULL;
166. > 	M_ASN1_New(ret->serialNumber,ASN1_INTEGER_new);
167.   	M_ASN1_New(ret->signature,X509_ALGOR_new);
168.   	M_ASN1_New(ret->issuer,X509_NAME_new);

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

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

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

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

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

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

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

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

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

crypto/asn1/x_cinf.c:166:2: Taking false branch
164.   	M_ASN1_New_Malloc(ret,X509_CINF);
165.   	ret->version=NULL;
166.   	M_ASN1_New(ret->serialNumber,ASN1_INTEGER_new);
        ^
167.   	M_ASN1_New(ret->signature,X509_ALGOR_new);
168.   	M_ASN1_New(ret->issuer,X509_NAME_new);

crypto/asn1/x_cinf.c:167:2: 
165.   	ret->version=NULL;
166.   	M_ASN1_New(ret->serialNumber,ASN1_INTEGER_new);
167. > 	M_ASN1_New(ret->signature,X509_ALGOR_new);
168.   	M_ASN1_New(ret->issuer,X509_NAME_new);
169.   	M_ASN1_New(ret->validity,X509_VAL_new);

crypto/asn1/x_algor.c:96:1: start of procedure X509_ALGOR_new()
  94.   	}
  95.   
  96. > X509_ALGOR *X509_ALGOR_new(void)
  97.   	{
  98.   	X509_ALGOR *ret=NULL;

crypto/asn1/x_algor.c:98:2: 
  96.   X509_ALGOR *X509_ALGOR_new(void)
  97.   	{
  98. > 	X509_ALGOR *ret=NULL;
  99.   	ASN1_CTX c;
  100.   

crypto/asn1/x_algor.c:101:2: Taking false branch
  99.   	ASN1_CTX c;
  100.   
  101.   	M_ASN1_New_Malloc(ret,X509_ALGOR);
          ^
  102.   	ret->algorithm=OBJ_nid2obj(NID_undef);
  103.   	ret->parameter=NULL;

crypto/asn1/x_algor.c:102:2: 
  100.   
  101.   	M_ASN1_New_Malloc(ret,X509_ALGOR);
  102. > 	ret->algorithm=OBJ_nid2obj(NID_undef);
  103.   	ret->parameter=NULL;
  104.   	return(ret);

crypto/objects/obj_dat.c:258:1: start of procedure OBJ_nid2obj()
    256.   	}
    257.   
    258. > ASN1_OBJECT *OBJ_nid2obj(int n)
    259.   	{
    260.   	ADDED_OBJ ad,*adp;

crypto/objects/obj_dat.c:263:7: Taking true branch
    261.   	ASN1_OBJECT ob;
    262.   
    263.   	if ((n >= 0) && (n < NUM_NID))
                 ^
    264.   		{
    265.   		if ((n != NID_undef) && (nid_objs[n].nid == NID_undef))

crypto/objects/obj_dat.c:263:19: Taking true branch
    261.   	ASN1_OBJECT ob;
    262.   
    263.   	if ((n >= 0) && (n < NUM_NID))
                             ^
    264.   		{
    265.   		if ((n != NID_undef) && (nid_objs[n].nid == NID_undef))

crypto/objects/obj_dat.c:265:8: Taking false branch
    263.   	if ((n >= 0) && (n < NUM_NID))
    264.   		{
    265.   		if ((n != NID_undef) && (nid_objs[n].nid == NID_undef))
                  ^
    266.   			{
    267.   			OBJerr(OBJ_F_OBJ_NID2OBJ,OBJ_R_UNKNOWN_NID);

crypto/objects/obj_dat.c:270:3: 
    268.   			return(NULL);
    269.   			}
    270. > 		return((ASN1_OBJECT *)&(nid_objs[n]));
    271.   		}
    272.   	else if (added == NULL)

crypto/objects/obj_dat.c:288:2: return from a call to OBJ_nid2obj
    286.   			}
    287.   		}
    288.   	}
            ^
    289.   
    290.   const char *OBJ_nid2sn(int n)

crypto/asn1/x_algor.c:103:2: 
  101.   	M_ASN1_New_Malloc(ret,X509_ALGOR);
  102.   	ret->algorithm=OBJ_nid2obj(NID_undef);
  103. > 	ret->parameter=NULL;
  104.   	return(ret);
  105.   	M_ASN1_New_Error(ASN1_F_X509_ALGOR_NEW);

crypto/asn1/x_algor.c:104:2: 
  102.   	ret->algorithm=OBJ_nid2obj(NID_undef);
  103.   	ret->parameter=NULL;
  104. > 	return(ret);
  105.   	M_ASN1_New_Error(ASN1_F_X509_ALGOR_NEW);
  106.   	}

crypto/asn1/x_algor.c:106:2: return from a call to X509_ALGOR_new
  104.   	return(ret);
  105.   	M_ASN1_New_Error(ASN1_F_X509_ALGOR_NEW);
  106.   	}
          ^
  107.   
  108.   void X509_ALGOR_free(X509_ALGOR *a)

crypto/asn1/x_cinf.c:167:2: Taking false branch
165.   	ret->version=NULL;
166.   	M_ASN1_New(ret->serialNumber,ASN1_INTEGER_new);
167.   	M_ASN1_New(ret->signature,X509_ALGOR_new);
        ^
168.   	M_ASN1_New(ret->issuer,X509_NAME_new);
169.   	M_ASN1_New(ret->validity,X509_VAL_new);

crypto/asn1/x_cinf.c:168:2: Taking true branch
166.   	M_ASN1_New(ret->serialNumber,ASN1_INTEGER_new);
167.   	M_ASN1_New(ret->signature,X509_ALGOR_new);
168.   	M_ASN1_New(ret->issuer,X509_NAME_new);
        ^
169.   	M_ASN1_New(ret->validity,X509_VAL_new);
170.   	M_ASN1_New(ret->subject,X509_NAME_new);
