crypto/pkcs12/p12_sbag.c:149: error: MEMORY_LEAK
  memory dynamically allocated to `return` by call to `malloc()` at line 146, column 2 is not reachable after line 149, column 2.
Showing all 12 steps of the trace


crypto/pkcs12/p12_sbag.c:142:1: start of procedure PKCS12_SAFEBAG_new()
140.   }
141.   
142. > PKCS12_SAFEBAG *PKCS12_SAFEBAG_new(void)
143.   {
144.   	PKCS12_SAFEBAG *ret=NULL;

crypto/pkcs12/p12_sbag.c:144:2: 
142.   PKCS12_SAFEBAG *PKCS12_SAFEBAG_new(void)
143.   {
144. > 	PKCS12_SAFEBAG *ret=NULL;
145.   	ASN1_CTX c;
146.   	M_ASN1_New_Malloc(ret, PKCS12_SAFEBAG);

crypto/pkcs12/p12_sbag.c:146:2: Taking false branch
144.   	PKCS12_SAFEBAG *ret=NULL;
145.   	ASN1_CTX c;
146.   	M_ASN1_New_Malloc(ret, PKCS12_SAFEBAG);
        ^
147.   	ret->type=NULL;
148.   	ret->value.other=NULL;

crypto/pkcs12/p12_sbag.c:147:2: 
145.   	ASN1_CTX c;
146.   	M_ASN1_New_Malloc(ret, PKCS12_SAFEBAG);
147. > 	ret->type=NULL;
148.   	ret->value.other=NULL;
149.   	M_ASN1_New(ret->attrib, sk_new_null);

crypto/pkcs12/p12_sbag.c:148:2: 
146.   	M_ASN1_New_Malloc(ret, PKCS12_SAFEBAG);
147.   	ret->type=NULL;
148. > 	ret->value.other=NULL;
149.   	M_ASN1_New(ret->attrib, sk_new_null);
150.   	ret->rest=NULL;

crypto/pkcs12/p12_sbag.c:149:2: 
147.   	ret->type=NULL;
148.   	ret->value.other=NULL;
149. > 	M_ASN1_New(ret->attrib, sk_new_null);
150.   	ret->rest=NULL;
151.   	return (ret);

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/pkcs12/p12_sbag.c:149:2: Taking true branch
147.   	ret->type=NULL;
148.   	ret->value.other=NULL;
149.   	M_ASN1_New(ret->attrib, sk_new_null);
        ^
150.   	ret->rest=NULL;
151.   	return (ret);
