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


crypto/asn1/p7_evp.c:101:1: start of procedure PKCS7_ENVELOPE_new()
99.   	}
100.   
101. > PKCS7_ENVELOPE *PKCS7_ENVELOPE_new(void)
102.   	{
103.   	PKCS7_ENVELOPE *ret=NULL;

crypto/asn1/p7_evp.c:103:2: 
101.   PKCS7_ENVELOPE *PKCS7_ENVELOPE_new(void)
102.   	{
103. > 	PKCS7_ENVELOPE *ret=NULL;
104.   	ASN1_CTX c;
105.   

crypto/asn1/p7_evp.c:106:2: Taking false branch
104.   	ASN1_CTX c;
105.   
106.   	M_ASN1_New_Malloc(ret,PKCS7_ENVELOPE);
        ^
107.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
108.   	M_ASN1_New(ret->recipientinfo,sk_new_null);

crypto/asn1/p7_evp.c:107:2: 
105.   
106.   	M_ASN1_New_Malloc(ret,PKCS7_ENVELOPE);
107. > 	M_ASN1_New(ret->version,ASN1_INTEGER_new);
108.   	M_ASN1_New(ret->recipientinfo,sk_new_null);
109.   	M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_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/p7_evp.c:107:2: Taking false branch
105.   
106.   	M_ASN1_New_Malloc(ret,PKCS7_ENVELOPE);
107.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
        ^
108.   	M_ASN1_New(ret->recipientinfo,sk_new_null);
109.   	M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new);

crypto/asn1/p7_evp.c:108:2: 
106.   	M_ASN1_New_Malloc(ret,PKCS7_ENVELOPE);
107.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
108. > 	M_ASN1_New(ret->recipientinfo,sk_new_null);
109.   	M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new);
110.   	return(ret);

crypto/stack/stack.c:117:1: start of procedure sk_new()
  115.   	}
  116.   
  117. > STACK *sk_new(int (*c)())
  118.   	{
  119.   	STACK *ret;

crypto/stack/stack.c:122:6: Taking true branch
  120.   	int i;
  121.   
  122.   	if ((ret=(STACK *)Malloc(sizeof(STACK))) == NULL)
              ^
  123.   		goto err0;
  124.   	if ((ret->data=(char **)Malloc(sizeof(char *)*MIN_NODES)) == NULL)

crypto/stack/stack.c:135:1: 
  133.   err1:
  134.   	Free((char *)ret);
  135. > err0:
  136.   	return(NULL);
  137.   	}

crypto/stack/stack.c:136:2: 
  134.   	Free((char *)ret);
  135.   err0:
  136. > 	return(NULL);
  137.   	}
  138.   

crypto/stack/stack.c:137:2: return from a call to sk_new
  135.   err0:
  136.   	return(NULL);
  137.   	}
          ^
  138.   
  139.   int sk_insert(STACK *st, char *data, int loc)

crypto/asn1/p7_evp.c:108:2: Taking true branch
106.   	M_ASN1_New_Malloc(ret,PKCS7_ENVELOPE);
107.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
108.   	M_ASN1_New(ret->recipientinfo,sk_new_null);
        ^
109.   	M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new);
110.   	return(ret);

PKCS7_ENVELOPE *PKCS7_ENVELOPE_new(void)
	{
	PKCS7_ENVELOPE *ret=NULL;
	ASN1_CTX c;
	M_ASN1_New_Malloc(ret,PKCS7_ENVELOPE);
	M_ASN1_New(ret->version,ASN1_INTEGER_new);
	M_ASN1_New(ret->recipientinfo,sk_new_null);
	M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new);
	return(ret);
	M_ASN1_New_Error(ASN1_F_PKCS7_ENVELOPE_NEW);
	}
['PKCS7_ENVELOPE *PKCS7_ENVELOPE_new(void)\n\t{\n\tPKCS7_ENVELOPE *ret=NULL;\n\tASN1_CTX c;\n\tM_ASN1_New_Malloc(ret,PKCS7_ENVELOPE);\n\tM_ASN1_New(ret->version,ASN1_INTEGER_new);\n\tM_ASN1_New(ret->recipientinfo,sk_new_null);\n\tM_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new);\n\treturn(ret);\n\tM_ASN1_New_Error(ASN1_F_PKCS7_ENVELOPE_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}', 'STACK *sk_new(int (*c)())\n\t{\n\tSTACK *ret;\n\tint i;\n\tif ((ret=(STACK *)Malloc(sizeof(STACK))) == NULL)\n\t\tgoto err0;\n\tif ((ret->data=(char **)Malloc(sizeof(char *)*MIN_NODES)) == NULL)\n\t\tgoto err1;\n\tfor (i=0; i<MIN_NODES; i++)\n\t\tret->data[i]=NULL;\n\tret->comp=c;\n\tret->num_alloc=MIN_NODES;\n\tret->num=0;\n\tret->sorted=0;\n\treturn(ret);\nerr1:\n\tFree((char *)ret);\nerr0:\n\treturn(NULL);\n\t}']