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


crypto/asn1/p7_signd.c:105:1: start of procedure PKCS7_SIGNED_new()
103.   	}
104.   
105. > PKCS7_SIGNED *PKCS7_SIGNED_new(void)
106.   	{
107.   	PKCS7_SIGNED *ret=NULL;

crypto/asn1/p7_signd.c:107:2: 
105.   PKCS7_SIGNED *PKCS7_SIGNED_new(void)
106.   	{
107. > 	PKCS7_SIGNED *ret=NULL;
108.   	ASN1_CTX c;
109.   

crypto/asn1/p7_signd.c:110:2: Taking false branch
108.   	ASN1_CTX c;
109.   
110.   	M_ASN1_New_Malloc(ret,PKCS7_SIGNED);
        ^
111.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
112.   	M_ASN1_New(ret->md_algs,sk_new_null);

crypto/asn1/p7_signd.c:111:2: 
109.   
110.   	M_ASN1_New_Malloc(ret,PKCS7_SIGNED);
111. > 	M_ASN1_New(ret->version,ASN1_INTEGER_new);
112.   	M_ASN1_New(ret->md_algs,sk_new_null);
113.   	M_ASN1_New(ret->contents,PKCS7_new);

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_signd.c:111:2: Taking false branch
109.   
110.   	M_ASN1_New_Malloc(ret,PKCS7_SIGNED);
111.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
        ^
112.   	M_ASN1_New(ret->md_algs,sk_new_null);
113.   	M_ASN1_New(ret->contents,PKCS7_new);

crypto/asn1/p7_signd.c:112:2: 
110.   	M_ASN1_New_Malloc(ret,PKCS7_SIGNED);
111.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
112. > 	M_ASN1_New(ret->md_algs,sk_new_null);
113.   	M_ASN1_New(ret->contents,PKCS7_new);
114.   	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_signd.c:112:2: Taking true branch
110.   	M_ASN1_New_Malloc(ret,PKCS7_SIGNED);
111.   	M_ASN1_New(ret->version,ASN1_INTEGER_new);
112.   	M_ASN1_New(ret->md_algs,sk_new_null);
        ^
113.   	M_ASN1_New(ret->contents,PKCS7_new);
114.   	ret->cert=NULL;
