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


crypto/asn1/p7_s_e.c:110:1: start of procedure PKCS7_SIGN_ENVELOPE_new()
108.   	}
109.   
110. > PKCS7_SIGN_ENVELOPE *PKCS7_SIGN_ENVELOPE_new(void)
111.   	{
112.   	PKCS7_SIGN_ENVELOPE *ret=NULL;

crypto/asn1/p7_s_e.c:112:2: 
110.   PKCS7_SIGN_ENVELOPE *PKCS7_SIGN_ENVELOPE_new(void)
111.   	{
112. > 	PKCS7_SIGN_ENVELOPE *ret=NULL;
113.   	ASN1_CTX c;
114.   

crypto/asn1/p7_s_e.c:115:2: Taking false branch
113.   	ASN1_CTX c;
114.   
115.   	M_ASN1_New_Malloc(ret,PKCS7_SIGN_ENVELOPE);
        ^
116.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
117.   	M_ASN1_New(ret->recipientinfo,sk_new_null);

crypto/asn1/p7_s_e.c:116:2: 
114.   
115.   	M_ASN1_New_Malloc(ret,PKCS7_SIGN_ENVELOPE);
116. > 	M_ASN1_New(ret->version,ASN1_INTEGER_new);
117.   	M_ASN1_New(ret->recipientinfo,sk_new_null);
118.   	M_ASN1_New(ret->md_algs,sk_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:116:2: Taking false branch
114.   
115.   	M_ASN1_New_Malloc(ret,PKCS7_SIGN_ENVELOPE);
116.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
        ^
117.   	M_ASN1_New(ret->recipientinfo,sk_new_null);
118.   	M_ASN1_New(ret->md_algs,sk_new_null);

crypto/asn1/p7_s_e.c:117:2: 
115.   	M_ASN1_New_Malloc(ret,PKCS7_SIGN_ENVELOPE);
116.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
117. > 	M_ASN1_New(ret->recipientinfo,sk_new_null);
118.   	M_ASN1_New(ret->md_algs,sk_new_null);
119.   	M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new);

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 false 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:119:6: Taking false branch
  117.   	if ((ret=(STACK *)Malloc(sizeof(STACK))) == NULL)
  118.   		goto err0;
  119.   	if ((ret->data=(char **)Malloc(sizeof(char *)*MIN_NODES)) == NULL)
              ^
  120.   		goto err1;
  121.   	for (i=0; i<MIN_NODES; i++)

crypto/stack/stack.c:121:7: 
  119.   	if ((ret->data=(char **)Malloc(sizeof(char *)*MIN_NODES)) == NULL)
  120.   		goto err1;
  121. > 	for (i=0; i<MIN_NODES; i++)
  122.   		ret->data[i]=NULL;
  123.   	ret->comp=c;

crypto/stack/stack.c:121:12: Loop condition is true. Entering loop body
  119.   	if ((ret->data=(char **)Malloc(sizeof(char *)*MIN_NODES)) == NULL)
  120.   		goto err1;
  121.   	for (i=0; i<MIN_NODES; i++)
                    ^
  122.   		ret->data[i]=NULL;
  123.   	ret->comp=c;

crypto/stack/stack.c:122:3: 
  120.   		goto err1;
  121.   	for (i=0; i<MIN_NODES; i++)
  122. > 		ret->data[i]=NULL;
  123.   	ret->comp=c;
  124.   	ret->num_alloc=MIN_NODES;

crypto/stack/stack.c:121:25: 
  119.   	if ((ret->data=(char **)Malloc(sizeof(char *)*MIN_NODES)) == NULL)
  120.   		goto err1;
  121. > 	for (i=0; i<MIN_NODES; i++)
  122.   		ret->data[i]=NULL;
  123.   	ret->comp=c;

crypto/stack/stack.c:121:12: Loop condition is false. Leaving loop
  119.   	if ((ret->data=(char **)Malloc(sizeof(char *)*MIN_NODES)) == NULL)
  120.   		goto err1;
  121.   	for (i=0; i<MIN_NODES; i++)
                    ^
  122.   		ret->data[i]=NULL;
  123.   	ret->comp=c;

crypto/stack/stack.c:123:2: 
  121.   	for (i=0; i<MIN_NODES; i++)
  122.   		ret->data[i]=NULL;
  123. > 	ret->comp=c;
  124.   	ret->num_alloc=MIN_NODES;
  125.   	ret->num=0;

crypto/stack/stack.c:124:2: 
  122.   		ret->data[i]=NULL;
  123.   	ret->comp=c;
  124. > 	ret->num_alloc=MIN_NODES;
  125.   	ret->num=0;
  126.   	ret->sorted=0;

crypto/stack/stack.c:125:2: 
  123.   	ret->comp=c;
  124.   	ret->num_alloc=MIN_NODES;
  125. > 	ret->num=0;
  126.   	ret->sorted=0;
  127.   	return(ret);

crypto/stack/stack.c:126:2: 
  124.   	ret->num_alloc=MIN_NODES;
  125.   	ret->num=0;
  126. > 	ret->sorted=0;
  127.   	return(ret);
  128.   err1:

crypto/stack/stack.c:127:2: 
  125.   	ret->num=0;
  126.   	ret->sorted=0;
  127. > 	return(ret);
  128.   err1:
  129.   	Free((char *)ret);

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_s_e.c:117:2: Taking false branch
115.   	M_ASN1_New_Malloc(ret,PKCS7_SIGN_ENVELOPE);
116.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
117.   	M_ASN1_New(ret->recipientinfo,sk_new_null);
        ^
118.   	M_ASN1_New(ret->md_algs,sk_new_null);
119.   	M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new);

crypto/asn1/p7_s_e.c:118:2: 
116.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
117.   	M_ASN1_New(ret->recipientinfo,sk_new_null);
118. > 	M_ASN1_New(ret->md_algs,sk_new_null);
119.   	M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new);
120.   	ret->cert=NULL;

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_s_e.c:118:2: Taking true branch
116.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
117.   	M_ASN1_New(ret->recipientinfo,sk_new_null);
118.   	M_ASN1_New(ret->md_algs,sk_new_null);
        ^
119.   	M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new);
120.   	ret->cert=NULL;
