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


crypto/asn1/x_req.c:147:1: start of procedure X509_REQ_INFO_new()
145.   	}
146.   
147. > X509_REQ_INFO *X509_REQ_INFO_new(void)
148.   	{
149.   	X509_REQ_INFO *ret=NULL;

crypto/asn1/x_req.c:149:2: 
147.   X509_REQ_INFO *X509_REQ_INFO_new(void)
148.   	{
149. > 	X509_REQ_INFO *ret=NULL;
150.   	ASN1_CTX c;
151.   

crypto/asn1/x_req.c:152:2: Taking false branch
150.   	ASN1_CTX c;
151.   
152.   	M_ASN1_New_Malloc(ret,X509_REQ_INFO);
        ^
153.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
154.   	M_ASN1_New(ret->subject,X509_NAME_new);

crypto/asn1/x_req.c:153:2: 
151.   
152.   	M_ASN1_New_Malloc(ret,X509_REQ_INFO);
153. > 	M_ASN1_New(ret->version,ASN1_INTEGER_new);
154.   	M_ASN1_New(ret->subject,X509_NAME_new);
155.   	M_ASN1_New(ret->pubkey,X509_PUBKEY_new);

crypto/asn1/asn1_lib.c:368:1: start of procedure ASN1_STRING_type_new()
  366.   
  367.   
  368. > ASN1_STRING *ASN1_STRING_type_new(int type)
  369.   	{
  370.   	ASN1_STRING *ret;

crypto/asn1/asn1_lib.c:372:2: 
  370.   	ASN1_STRING *ret;
  371.   
  372. > 	ret=(ASN1_STRING *)Malloc(sizeof(ASN1_STRING));
  373.   	if (ret == NULL)
  374.   		{

crypto/asn1/asn1_lib.c:373:6: Taking false branch
  371.   
  372.   	ret=(ASN1_STRING *)Malloc(sizeof(ASN1_STRING));
  373.   	if (ret == NULL)
              ^
  374.   		{
  375.   		ASN1err(ASN1_F_ASN1_STRING_TYPE_NEW,ERR_R_MALLOC_FAILURE);

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

crypto/asn1/asn1_lib.c:379:2: 
  377.   		}
  378.   	ret->length=0;
  379. > 	ret->type=type;
  380.   	ret->data=NULL;
  381.   	ret->flags=0;

crypto/asn1/asn1_lib.c:380:2: 
  378.   	ret->length=0;
  379.   	ret->type=type;
  380. > 	ret->data=NULL;
  381.   	ret->flags=0;
  382.   	return(ret);

crypto/asn1/asn1_lib.c:381:2: 
  379.   	ret->type=type;
  380.   	ret->data=NULL;
  381. > 	ret->flags=0;
  382.   	return(ret);
  383.   	}

crypto/asn1/asn1_lib.c:382:2: 
  380.   	ret->data=NULL;
  381.   	ret->flags=0;
  382. > 	return(ret);
  383.   	}
  384.   

crypto/asn1/asn1_lib.c:383:2: return from a call to ASN1_STRING_type_new
  381.   	ret->flags=0;
  382.   	return(ret);
  383.   	}
          ^
  384.   
  385.   void ASN1_STRING_free(ASN1_STRING *a)

crypto/asn1/x_req.c:153:2: Taking false branch
151.   
152.   	M_ASN1_New_Malloc(ret,X509_REQ_INFO);
153.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
        ^
154.   	M_ASN1_New(ret->subject,X509_NAME_new);
155.   	M_ASN1_New(ret->pubkey,X509_PUBKEY_new);

crypto/asn1/x_req.c:154:2: Taking true branch
152.   	M_ASN1_New_Malloc(ret,X509_REQ_INFO);
153.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
154.   	M_ASN1_New(ret->subject,X509_NAME_new);
        ^
155.   	M_ASN1_New(ret->pubkey,X509_PUBKEY_new);
156.   	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}']