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


crypto/asn1/p7_s_e.c:116:1: start of procedure PKCS7_SIGN_ENVELOPE_new()
114.   	}
115.   
116. > PKCS7_SIGN_ENVELOPE *PKCS7_SIGN_ENVELOPE_new(void)
117.   	{
118.   	PKCS7_SIGN_ENVELOPE *ret=NULL;

crypto/asn1/p7_s_e.c:118:2: 
116.   PKCS7_SIGN_ENVELOPE *PKCS7_SIGN_ENVELOPE_new(void)
117.   	{
118. > 	PKCS7_SIGN_ENVELOPE *ret=NULL;
119.   	ASN1_CTX c;
120.   

crypto/asn1/p7_s_e.c:121:2: Taking false branch
119.   	ASN1_CTX c;
120.   
121.   	M_ASN1_New_Malloc(ret,PKCS7_SIGN_ENVELOPE);
        ^
122.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
123.   	M_ASN1_New(ret->recipientinfo,sk_PKCS7_RECIP_INFO_new_null);

crypto/asn1/p7_s_e.c:122:2: 
120.   
121.   	M_ASN1_New_Malloc(ret,PKCS7_SIGN_ENVELOPE);
122. > 	M_ASN1_New(ret->version,ASN1_INTEGER_new);
123.   	M_ASN1_New(ret->recipientinfo,sk_PKCS7_RECIP_INFO_new_null);
124.   	M_ASN1_New(ret->md_algs,sk_X509_ALGOR_new_null);

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/p7_s_e.c:122:2: Taking false branch
120.   
121.   	M_ASN1_New_Malloc(ret,PKCS7_SIGN_ENVELOPE);
122.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
        ^
123.   	M_ASN1_New(ret->recipientinfo,sk_PKCS7_RECIP_INFO_new_null);
124.   	M_ASN1_New(ret->md_algs,sk_X509_ALGOR_new_null);

crypto/asn1/p7_s_e.c:123:2: 
121.   	M_ASN1_New_Malloc(ret,PKCS7_SIGN_ENVELOPE);
122.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
123. > 	M_ASN1_New(ret->recipientinfo,sk_PKCS7_RECIP_INFO_new_null);
124.   	M_ASN1_New(ret->md_algs,sk_X509_ALGOR_new_null);
125.   	M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new);

crypto/asn1/p7_recip.c:124:1: start of procedure sk_PKCS7_RECIP_INFO_new_null()
  122.   	}
  123.   
  124. > IMPLEMENT_STACK_OF(PKCS7_RECIP_INFO)
  125.   IMPLEMENT_ASN1_SET_OF(PKCS7_RECIP_INFO)

crypto/stack/stack.c:112:1: start of procedure sk_new()
    110.   	}
    111.   
    112. > STACK *sk_new(int (*c)())
    113.   	{
    114.   	STACK *ret;

crypto/stack/stack.c:117:6: Taking true branch
    115.   	int i;
    116.   
    117.   	if ((ret=(STACK *)Malloc(sizeof(STACK))) == NULL)
                ^
    118.   		goto err0;
    119.   	if ((ret->data=(char **)Malloc(sizeof(char *)*MIN_NODES)) == NULL)

crypto/stack/stack.c:130:1: 
    128.   err1:
    129.   	Free((char *)ret);
    130. > err0:
    131.   	return(NULL);
    132.   	}

crypto/stack/stack.c:131:2: 
    129.   	Free((char *)ret);
    130.   err0:
    131. > 	return(NULL);
    132.   	}
    133.   

crypto/stack/stack.c:132:2: return from a call to sk_new
    130.   err0:
    131.   	return(NULL);
    132.   	}
            ^
    133.   
    134.   int sk_insert(STACK *st, char *data, int loc)

crypto/asn1/p7_recip.c:124:1: return from a call to sk_PKCS7_RECIP_INFO_new_null
  122.   	}
  123.   
  124. > IMPLEMENT_STACK_OF(PKCS7_RECIP_INFO)
  125.   IMPLEMENT_ASN1_SET_OF(PKCS7_RECIP_INFO)

crypto/asn1/p7_s_e.c:123:2: Taking true branch
121.   	M_ASN1_New_Malloc(ret,PKCS7_SIGN_ENVELOPE);
122.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
123.   	M_ASN1_New(ret->recipientinfo,sk_PKCS7_RECIP_INFO_new_null);
        ^
124.   	M_ASN1_New(ret->md_algs,sk_X509_ALGOR_new_null);
125.   	M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new);
