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


crypto/asn1/x_crl.c:250:1: start of procedure X509_CRL_INFO_new()
248.   	}
249.   
250. > X509_CRL_INFO *X509_CRL_INFO_new(void)
251.   	{
252.   	X509_CRL_INFO *ret=NULL;

crypto/asn1/x_crl.c:252:2: 
250.   X509_CRL_INFO *X509_CRL_INFO_new(void)
251.   	{
252. > 	X509_CRL_INFO *ret=NULL;
253.   	ASN1_CTX c;
254.   

crypto/asn1/x_crl.c:255:2: Taking false branch
253.   	ASN1_CTX c;
254.   
255.   	M_ASN1_New_Malloc(ret,X509_CRL_INFO);
        ^
256.   	ret->version=NULL;
257.   	M_ASN1_New(ret->sig_alg,X509_ALGOR_new);

crypto/asn1/x_crl.c:256:2: 
254.   
255.   	M_ASN1_New_Malloc(ret,X509_CRL_INFO);
256. > 	ret->version=NULL;
257.   	M_ASN1_New(ret->sig_alg,X509_ALGOR_new);
258.   	M_ASN1_New(ret->issuer,X509_NAME_new);

crypto/asn1/x_crl.c:257:2: 
255.   	M_ASN1_New_Malloc(ret,X509_CRL_INFO);
256.   	ret->version=NULL;
257. > 	M_ASN1_New(ret->sig_alg,X509_ALGOR_new);
258.   	M_ASN1_New(ret->issuer,X509_NAME_new);
259.   	M_ASN1_New(ret->lastUpdate,ASN1_UTCTIME_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_crl.c:257:2: Taking false branch
255.   	M_ASN1_New_Malloc(ret,X509_CRL_INFO);
256.   	ret->version=NULL;
257.   	M_ASN1_New(ret->sig_alg,X509_ALGOR_new);
        ^
258.   	M_ASN1_New(ret->issuer,X509_NAME_new);
259.   	M_ASN1_New(ret->lastUpdate,ASN1_UTCTIME_new);

crypto/asn1/x_crl.c:258:2: Taking true branch
256.   	ret->version=NULL;
257.   	M_ASN1_New(ret->sig_alg,X509_ALGOR_new);
258.   	M_ASN1_New(ret->issuer,X509_NAME_new);
        ^
259.   	M_ASN1_New(ret->lastUpdate,ASN1_UTCTIME_new);
260.   	ret->nextUpdate=NULL;

X509_CRL_INFO *X509_CRL_INFO_new(void)
	{
	X509_CRL_INFO *ret=NULL;
	ASN1_CTX c;
	M_ASN1_New_Malloc(ret,X509_CRL_INFO);
	ret->version=NULL;
	M_ASN1_New(ret->sig_alg,X509_ALGOR_new);
	M_ASN1_New(ret->issuer,X509_NAME_new);
	M_ASN1_New(ret->lastUpdate,ASN1_UTCTIME_new);
	ret->nextUpdate=NULL;
	M_ASN1_New(ret->revoked,sk_new_null);
	M_ASN1_New(ret->extensions,sk_X509_EXTENSION_new_null);
	ret->revoked->comp=(int (*)())X509_REVOKED_cmp;
	return(ret);
	M_ASN1_New_Error(ASN1_F_X509_CRL_INFO_NEW);
	}
['X509_CRL_INFO *X509_CRL_INFO_new(void)\n\t{\n\tX509_CRL_INFO *ret=NULL;\n\tASN1_CTX c;\n\tM_ASN1_New_Malloc(ret,X509_CRL_INFO);\n\tret->version=NULL;\n\tM_ASN1_New(ret->sig_alg,X509_ALGOR_new);\n\tM_ASN1_New(ret->issuer,X509_NAME_new);\n\tM_ASN1_New(ret->lastUpdate,ASN1_UTCTIME_new);\n\tret->nextUpdate=NULL;\n\tM_ASN1_New(ret->revoked,sk_new_null);\n\tM_ASN1_New(ret->extensions,sk_X509_EXTENSION_new_null);\n\tret->revoked->comp=(int (*)())X509_REVOKED_cmp;\n\treturn(ret);\n\tM_ASN1_New_Error(ASN1_F_X509_CRL_INFO_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}']