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


crypto/x509v3/v3_sxnet.c:109:1: start of procedure SXNET_new()
107.   }
108.   
109. > SXNET *SXNET_new(void)
110.   {
111.   	SXNET *ret=NULL;

crypto/x509v3/v3_sxnet.c:111:2: 
109.   SXNET *SXNET_new(void)
110.   {
111. > 	SXNET *ret=NULL;
112.   	ASN1_CTX c;
113.   	M_ASN1_New_Malloc(ret, SXNET);

crypto/x509v3/v3_sxnet.c:113:2: Taking false branch
111.   	SXNET *ret=NULL;
112.   	ASN1_CTX c;
113.   	M_ASN1_New_Malloc(ret, SXNET);
        ^
114.   	M_ASN1_New(ret->version,M_ASN1_INTEGER_new);
115.   	M_ASN1_New(ret->ids,sk_SXNETID_new_null);

crypto/x509v3/v3_sxnet.c:114:2: 
112.   	ASN1_CTX c;
113.   	M_ASN1_New_Malloc(ret, SXNET);
114. > 	M_ASN1_New(ret->version,M_ASN1_INTEGER_new);
115.   	M_ASN1_New(ret->ids,sk_SXNETID_new_null);
116.   	return (ret);

crypto/asn1/asn1_lib.c:364:1: start of procedure ASN1_STRING_type_new()
  362.   
  363.   
  364. > ASN1_STRING *ASN1_STRING_type_new(int type)
  365.   	{
  366.   	ASN1_STRING *ret;

crypto/asn1/asn1_lib.c:368:2: 
  366.   	ASN1_STRING *ret;
  367.   
  368. > 	ret=(ASN1_STRING *)Malloc(sizeof(ASN1_STRING));
  369.   	if (ret == NULL)
  370.   		{

crypto/asn1/asn1_lib.c:369:6: Taking false branch
  367.   
  368.   	ret=(ASN1_STRING *)Malloc(sizeof(ASN1_STRING));
  369.   	if (ret == NULL)
              ^
  370.   		{
  371.   		ASN1err(ASN1_F_ASN1_STRING_TYPE_NEW,ERR_R_MALLOC_FAILURE);

crypto/asn1/asn1_lib.c:374:2: 
  372.   		return(NULL);
  373.   		}
  374. > 	ret->length=0;
  375.   	ret->type=type;
  376.   	ret->data=NULL;

crypto/asn1/asn1_lib.c:375:2: 
  373.   		}
  374.   	ret->length=0;
  375. > 	ret->type=type;
  376.   	ret->data=NULL;
  377.   	ret->flags=0;

crypto/asn1/asn1_lib.c:376:2: 
  374.   	ret->length=0;
  375.   	ret->type=type;
  376. > 	ret->data=NULL;
  377.   	ret->flags=0;
  378.   	return(ret);

crypto/asn1/asn1_lib.c:377:2: 
  375.   	ret->type=type;
  376.   	ret->data=NULL;
  377. > 	ret->flags=0;
  378.   	return(ret);
  379.   	}

crypto/asn1/asn1_lib.c:378:2: 
  376.   	ret->data=NULL;
  377.   	ret->flags=0;
  378. > 	return(ret);
  379.   	}
  380.   

crypto/asn1/asn1_lib.c:379:2: return from a call to ASN1_STRING_type_new
  377.   	ret->flags=0;
  378.   	return(ret);
  379.   	}
          ^
  380.   
  381.   void ASN1_STRING_free(ASN1_STRING *a)

crypto/x509v3/v3_sxnet.c:114:2: Taking false branch
112.   	ASN1_CTX c;
113.   	M_ASN1_New_Malloc(ret, SXNET);
114.   	M_ASN1_New(ret->version,M_ASN1_INTEGER_new);
        ^
115.   	M_ASN1_New(ret->ids,sk_SXNETID_new_null);
116.   	return (ret);

crypto/x509v3/v3_sxnet.c:115:2: 
113.   	M_ASN1_New_Malloc(ret, SXNET);
114.   	M_ASN1_New(ret->version,M_ASN1_INTEGER_new);
115. > 	M_ASN1_New(ret->ids,sk_SXNETID_new_null);
116.   	return (ret);
117.   	M_ASN1_New_Error(ASN1_F_SXNET_NEW);

crypto/x509v3/v3_sxnet.c:339:1: start of procedure sk_SXNETID_new_null()
  337.   }
  338.   
  339. > IMPLEMENT_STACK_OF(SXNETID)
  340.   IMPLEMENT_ASN1_SET_OF(SXNETID)

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/x509v3/v3_sxnet.c:339:1: return from a call to sk_SXNETID_new_null
  337.   }
  338.   
  339. > IMPLEMENT_STACK_OF(SXNETID)
  340.   IMPLEMENT_ASN1_SET_OF(SXNETID)

crypto/x509v3/v3_sxnet.c:115:2: Taking true branch
113.   	M_ASN1_New_Malloc(ret, SXNET);
114.   	M_ASN1_New(ret->version,M_ASN1_INTEGER_new);
115.   	M_ASN1_New(ret->ids,sk_SXNETID_new_null);
        ^
116.   	return (ret);
117.   	M_ASN1_New_Error(ASN1_F_SXNET_NEW);

SXNET *SXNET_new(void)
{
	SXNET *ret=NULL;
	ASN1_CTX c;
	M_ASN1_New_Malloc(ret, SXNET);
	M_ASN1_New(ret->version,M_ASN1_INTEGER_new);
	M_ASN1_New(ret->ids,sk_SXNETID_new_null);
	return (ret);
	M_ASN1_New_Error(ASN1_F_SXNET_NEW);
}
['SXNET *SXNET_new(void)\n{\n\tSXNET *ret=NULL;\n\tASN1_CTX c;\n\tM_ASN1_New_Malloc(ret, SXNET);\n\tM_ASN1_New(ret->version,M_ASN1_INTEGER_new);\n\tM_ASN1_New(ret->ids,sk_SXNETID_new_null);\n\treturn (ret);\n\tM_ASN1_New_Error(ASN1_F_SXNET_NEW);\n}', 'ASN1_STRING *ASN1_STRING_type_new(int type)\n\t{\n\tASN1_STRING *ret;\n\tret=(ASN1_STRING *)Malloc(sizeof(ASN1_STRING));\n\tif (ret == NULL)\n\t\t{\n\t\tASN1err(ASN1_F_ASN1_STRING_TYPE_NEW,ERR_R_MALLOC_FAILURE);\n\t\treturn(NULL);\n\t\t}\n\tret->length=0;\n\tret->type=type;\n\tret->data=NULL;\n\tret->flags=0;\n\treturn(ret);\n\t}', 'IMPLEMENT_STACK_OF(SXNETID)', 'STACK *sk_new(int (*c)())\n\t{\n\tSTACK *ret;\n\tint i;\n\tif ((ret=(STACK *)Malloc(sizeof(STACK))) == NULL)\n\t\tgoto err0;\n\tif ((ret->data=(char **)Malloc(sizeof(char *)*MIN_NODES)) == NULL)\n\t\tgoto err1;\n\tfor (i=0; i<MIN_NODES; i++)\n\t\tret->data[i]=NULL;\n\tret->comp=c;\n\tret->num_alloc=MIN_NODES;\n\tret->num=0;\n\tret->sorted=0;\n\treturn(ret);\nerr1:\n\tFree((char *)ret);\nerr0:\n\treturn(NULL);\n\t}']