crypto/asn1/x_x509.c:125: error: MEMORY_LEAK
  memory dynamically allocated by call to `X509_ALGOR_new()` at line 123, column 2 is not reachable after line 125, column 2.
Showing all 36 steps of the trace


crypto/asn1/x_x509.c:111:1: start of procedure X509_new()
109.   	}
110.   
111. > X509 *X509_new(void)
112.   	{
113.   	X509 *ret=NULL;

crypto/asn1/x_x509.c:113:2: 
111.   X509 *X509_new(void)
112.   	{
113. > 	X509 *ret=NULL;
114.   	ASN1_CTX c;
115.   

crypto/asn1/x_x509.c:116:2: Taking false branch
114.   	ASN1_CTX c;
115.   
116.   	M_ASN1_New_Malloc(ret,X509);
        ^
117.   	ret->references=1;
118.   	ret->valid=0;

crypto/asn1/x_x509.c:117:2: 
115.   
116.   	M_ASN1_New_Malloc(ret,X509);
117. > 	ret->references=1;
118.   	ret->valid=0;
119.   	ret->ex_flags = 0;

crypto/asn1/x_x509.c:118:2: 
116.   	M_ASN1_New_Malloc(ret,X509);
117.   	ret->references=1;
118. > 	ret->valid=0;
119.   	ret->ex_flags = 0;
120.   	ret->name=NULL;

crypto/asn1/x_x509.c:119:2: 
117.   	ret->references=1;
118.   	ret->valid=0;
119. > 	ret->ex_flags = 0;
120.   	ret->name=NULL;
121.   	ret->aux=NULL;

crypto/asn1/x_x509.c:120:2: 
118.   	ret->valid=0;
119.   	ret->ex_flags = 0;
120. > 	ret->name=NULL;
121.   	ret->aux=NULL;
122.   	M_ASN1_New(ret->cert_info,X509_CINF_new);

crypto/asn1/x_x509.c:121:2: 
119.   	ret->ex_flags = 0;
120.   	ret->name=NULL;
121. > 	ret->aux=NULL;
122.   	M_ASN1_New(ret->cert_info,X509_CINF_new);
123.   	M_ASN1_New(ret->sig_alg,X509_ALGOR_new);

crypto/asn1/x_x509.c:122:2: Taking false branch
120.   	ret->name=NULL;
121.   	ret->aux=NULL;
122.   	M_ASN1_New(ret->cert_info,X509_CINF_new);
        ^
123.   	M_ASN1_New(ret->sig_alg,X509_ALGOR_new);
124.   	M_ASN1_New(ret->signature,M_ASN1_BIT_STRING_new);

crypto/asn1/x_x509.c:123:2: 
121.   	ret->aux=NULL;
122.   	M_ASN1_New(ret->cert_info,X509_CINF_new);
123. > 	M_ASN1_New(ret->sig_alg,X509_ALGOR_new);
124.   	M_ASN1_New(ret->signature,M_ASN1_BIT_STRING_new);
125.   	CRYPTO_new_ex_data(x509_meth, (char *)ret, &ret->ex_data);

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

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

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

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

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

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

crypto/asn1/x_x509.c:123:2: Taking false branch
121.   	ret->aux=NULL;
122.   	M_ASN1_New(ret->cert_info,X509_CINF_new);
123.   	M_ASN1_New(ret->sig_alg,X509_ALGOR_new);
        ^
124.   	M_ASN1_New(ret->signature,M_ASN1_BIT_STRING_new);
125.   	CRYPTO_new_ex_data(x509_meth, (char *)ret, &ret->ex_data);

crypto/asn1/x_x509.c:124:2: 
122.   	M_ASN1_New(ret->cert_info,X509_CINF_new);
123.   	M_ASN1_New(ret->sig_alg,X509_ALGOR_new);
124. > 	M_ASN1_New(ret->signature,M_ASN1_BIT_STRING_new);
125.   	CRYPTO_new_ex_data(x509_meth, (char *)ret, &ret->ex_data);
126.   	return(ret);

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/x_x509.c:124:2: Taking false branch
122.   	M_ASN1_New(ret->cert_info,X509_CINF_new);
123.   	M_ASN1_New(ret->sig_alg,X509_ALGOR_new);
124.   	M_ASN1_New(ret->signature,M_ASN1_BIT_STRING_new);
        ^
125.   	CRYPTO_new_ex_data(x509_meth, (char *)ret, &ret->ex_data);
126.   	return(ret);

crypto/asn1/x_x509.c:125:2: Skipping CRYPTO_new_ex_data(): empty list of specs
123.   	M_ASN1_New(ret->sig_alg,X509_ALGOR_new);
124.   	M_ASN1_New(ret->signature,M_ASN1_BIT_STRING_new);
125.   	CRYPTO_new_ex_data(x509_meth, (char *)ret, &ret->ex_data);
        ^
126.   	return(ret);
127.   	M_ASN1_New_Error(ASN1_F_X509_NEW);

X509 *X509_new(void)
	{
	X509 *ret=NULL;
	ASN1_CTX c;
	M_ASN1_New_Malloc(ret,X509);
	ret->references=1;
	ret->valid=0;
	ret->ex_flags = 0;
	ret->name=NULL;
	ret->aux=NULL;
	M_ASN1_New(ret->cert_info,X509_CINF_new);
	M_ASN1_New(ret->sig_alg,X509_ALGOR_new);
	M_ASN1_New(ret->signature,M_ASN1_BIT_STRING_new);
	CRYPTO_new_ex_data(x509_meth, (char *)ret, &ret->ex_data);
	return(ret);
	M_ASN1_New_Error(ASN1_F_X509_NEW);
	}
['X509 *X509_new(void)\n\t{\n\tX509 *ret=NULL;\n\tASN1_CTX c;\n\tM_ASN1_New_Malloc(ret,X509);\n\tret->references=1;\n\tret->valid=0;\n\tret->ex_flags = 0;\n\tret->name=NULL;\n\tret->aux=NULL;\n\tM_ASN1_New(ret->cert_info,X509_CINF_new);\n\tM_ASN1_New(ret->sig_alg,X509_ALGOR_new);\n\tM_ASN1_New(ret->signature,M_ASN1_BIT_STRING_new);\n\tCRYPTO_new_ex_data(x509_meth, (char *)ret, &ret->ex_data);\n\treturn(ret);\n\tM_ASN1_New_Error(ASN1_F_X509_NEW);\n\t}', 'X509_ALGOR *X509_ALGOR_new(void)\n\t{\n\tX509_ALGOR *ret=NULL;\n\tASN1_CTX c;\n\tM_ASN1_New_Malloc(ret,X509_ALGOR);\n\tret->algorithm=OBJ_nid2obj(NID_undef);\n\tret->parameter=NULL;\n\treturn(ret);\n\tM_ASN1_New_Error(ASN1_F_X509_ALGOR_NEW);\n\t}', 'ASN1_OBJECT *OBJ_nid2obj(int n)\n\t{\n\tADDED_OBJ ad,*adp;\n\tASN1_OBJECT ob;\n\tif ((n >= 0) && (n < NUM_NID))\n\t\t{\n\t\tif ((n != NID_undef) && (nid_objs[n].nid == NID_undef))\n\t\t\t{\n\t\t\tOBJerr(OBJ_F_OBJ_NID2OBJ,OBJ_R_UNKNOWN_NID);\n\t\t\treturn(NULL);\n\t\t\t}\n\t\treturn((ASN1_OBJECT *)&(nid_objs[n]));\n\t\t}\n\telse if (added == NULL)\n\t\treturn(NULL);\n\telse\n\t\t{\n\t\tad.type=ADDED_NID;\n\t\tad.obj= &ob;\n\t\tob.nid=n;\n\t\tadp=(ADDED_OBJ *)lh_retrieve(added,(char *)&ad);\n\t\tif (adp != NULL)\n\t\t\treturn(adp->obj);\n\t\telse\n\t\t\t{\n\t\t\tOBJerr(OBJ_F_OBJ_NID2OBJ,OBJ_R_UNKNOWN_NID);\n\t\t\treturn(NULL);\n\t\t\t}\n\t\t}\n\t}', 'ASN1_STRING *ASN1_STRING_type_new(int type)\n\t{\n\tASN1_STRING *ret;\n\tret=(ASN1_STRING *)Malloc(sizeof(ASN1_STRING));\n\tif (ret == NULL)\n\t\t{\n\t\tASN1err(ASN1_F_ASN1_STRING_TYPE_NEW,ERR_R_MALLOC_FAILURE);\n\t\treturn(NULL);\n\t\t}\n\tret->length=0;\n\tret->type=type;\n\tret->data=NULL;\n\tret->flags=0;\n\treturn(ret);\n\t}']