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


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

crypto/asn1/p7_signd.c:112:2: 
110.   PKCS7_SIGNED *PKCS7_SIGNED_new(void)
111.   	{
112. > 	PKCS7_SIGNED *ret=NULL;
113.   	ASN1_CTX c;
114.   

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

crypto/asn1/p7_signd.c:116:2: 
114.   
115.   	M_ASN1_New_Malloc(ret,PKCS7_SIGNED);
116. > 	M_ASN1_New(ret->version,ASN1_INTEGER_new);
117.   	M_ASN1_New(ret->md_algs,sk_new_null);
118.   	M_ASN1_New(ret->contents,PKCS7_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_signd.c:116:2: Taking false branch
114.   
115.   	M_ASN1_New_Malloc(ret,PKCS7_SIGNED);
116.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
        ^
117.   	M_ASN1_New(ret->md_algs,sk_new_null);
118.   	M_ASN1_New(ret->contents,PKCS7_new);

crypto/asn1/p7_signd.c:117:2: 
115.   	M_ASN1_New_Malloc(ret,PKCS7_SIGNED);
116.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
117. > 	M_ASN1_New(ret->md_algs,sk_new_null);
118.   	M_ASN1_New(ret->contents,PKCS7_new);
119.   	ret->cert=NULL;

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_signd.c:117:2: Taking true branch
115.   	M_ASN1_New_Malloc(ret,PKCS7_SIGNED);
116.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
117.   	M_ASN1_New(ret->md_algs,sk_new_null);
        ^
118.   	M_ASN1_New(ret->contents,PKCS7_new);
119.   	ret->cert=NULL;
