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


crypto/asn1/x_req.c:140:1: start of procedure X509_REQ_INFO_new()
138.   	}
139.   
140. > X509_REQ_INFO *X509_REQ_INFO_new(void)
141.   	{
142.   	X509_REQ_INFO *ret=NULL;

crypto/asn1/x_req.c:142:2: 
140.   X509_REQ_INFO *X509_REQ_INFO_new(void)
141.   	{
142. > 	X509_REQ_INFO *ret=NULL;
143.   	ASN1_CTX c;
144.   

crypto/asn1/x_req.c:145:2: Taking false branch
143.   	ASN1_CTX c;
144.   
145.   	M_ASN1_New_Malloc(ret,X509_REQ_INFO);
        ^
146.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
147.   	M_ASN1_New(ret->subject,X509_NAME_new);

crypto/asn1/x_req.c:146:2: 
144.   
145.   	M_ASN1_New_Malloc(ret,X509_REQ_INFO);
146. > 	M_ASN1_New(ret->version,ASN1_INTEGER_new);
147.   	M_ASN1_New(ret->subject,X509_NAME_new);
148.   	M_ASN1_New(ret->pubkey,X509_PUBKEY_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_req.c:146:2: Taking false branch
144.   
145.   	M_ASN1_New_Malloc(ret,X509_REQ_INFO);
146.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
        ^
147.   	M_ASN1_New(ret->subject,X509_NAME_new);
148.   	M_ASN1_New(ret->pubkey,X509_PUBKEY_new);

crypto/asn1/x_req.c:147:2: Taking true branch
145.   	M_ASN1_New_Malloc(ret,X509_REQ_INFO);
146.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
147.   	M_ASN1_New(ret->subject,X509_NAME_new);
        ^
148.   	M_ASN1_New(ret->pubkey,X509_PUBKEY_new);
149.   	M_ASN1_New(ret->attributes,sk_new_null);

X509_REQ_INFO *X509_REQ_INFO_new(void)
	{
	X509_REQ_INFO *ret=NULL;
	ASN1_CTX c;
	M_ASN1_New_Malloc(ret,X509_REQ_INFO);
	M_ASN1_New(ret->version,ASN1_INTEGER_new);
	M_ASN1_New(ret->subject,X509_NAME_new);
	M_ASN1_New(ret->pubkey,X509_PUBKEY_new);
	M_ASN1_New(ret->attributes,sk_new_null);
	ret->req_kludge=0;
	return(ret);
	M_ASN1_New_Error(ASN1_F_X509_REQ_INFO_NEW);
	}
['X509_REQ_INFO *X509_REQ_INFO_new(void)\n\t{\n\tX509_REQ_INFO *ret=NULL;\n\tASN1_CTX c;\n\tM_ASN1_New_Malloc(ret,X509_REQ_INFO);\n\tM_ASN1_New(ret->version,ASN1_INTEGER_new);\n\tM_ASN1_New(ret->subject,X509_NAME_new);\n\tM_ASN1_New(ret->pubkey,X509_PUBKEY_new);\n\tM_ASN1_New(ret->attributes,sk_new_null);\n\tret->req_kludge=0;\n\treturn(ret);\n\tM_ASN1_New_Error(ASN1_F_X509_REQ_INFO_NEW);\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}']