crypto/x509v3/v3_sxnet.c:323: error: MEMORY_LEAK
  memory dynamically allocated by call to `ASN1_STRING_type_new()` at line 318, column 15 is not reachable after line 323, column 2.
Showing all 15 steps of the trace


crypto/x509v3/v3_sxnet.c:314:1: start of procedure SXNET_get_id_ulong()
312.   }
313.   
314. > ASN1_OCTET_STRING *SXNET_get_id_ulong(SXNET *sx, unsigned long lzone)
315.   {
316.   	ASN1_INTEGER *izone = NULL;

crypto/x509v3/v3_sxnet.c:316:2: 
314.   ASN1_OCTET_STRING *SXNET_get_id_ulong(SXNET *sx, unsigned long lzone)
315.   {
316. > 	ASN1_INTEGER *izone = NULL;
317.   	ASN1_OCTET_STRING *oct;
318.   	if(!(izone = ASN1_INTEGER_new()) || !ASN1_INTEGER_set(izone, lzone)) {

crypto/x509v3/v3_sxnet.c:318:7: 
316.   	ASN1_INTEGER *izone = NULL;
317.   	ASN1_OCTET_STRING *oct;
318. > 	if(!(izone = ASN1_INTEGER_new()) || !ASN1_INTEGER_set(izone, lzone)) {
319.   		X509V3err(X509V3_F_SXNET_GET_ID_ULONG,ERR_R_MALLOC_FAILURE);
320.   		ASN1_INTEGER_free(izone);

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/x509v3/v3_sxnet.c:318:7: Taking false branch
316.   	ASN1_INTEGER *izone = NULL;
317.   	ASN1_OCTET_STRING *oct;
318.   	if(!(izone = ASN1_INTEGER_new()) || !ASN1_INTEGER_set(izone, lzone)) {
             ^
319.   		X509V3err(X509V3_F_SXNET_GET_ID_ULONG,ERR_R_MALLOC_FAILURE);
320.   		ASN1_INTEGER_free(izone);

crypto/x509v3/v3_sxnet.c:318:39: Taking false branch
316.   	ASN1_INTEGER *izone = NULL;
317.   	ASN1_OCTET_STRING *oct;
318.   	if(!(izone = ASN1_INTEGER_new()) || !ASN1_INTEGER_set(izone, lzone)) {
                                             ^
319.   		X509V3err(X509V3_F_SXNET_GET_ID_ULONG,ERR_R_MALLOC_FAILURE);
320.   		ASN1_INTEGER_free(izone);

crypto/x509v3/v3_sxnet.c:323:2: Skipping SXNET_get_id_INTEGER(): empty list of specs
321.   		return NULL;
322.   	}
323.   	oct = SXNET_get_id_INTEGER(sx, izone);
        ^
324.   	ASN1_INTEGER_free(oct);
325.   	return oct;

ASN1_OCTET_STRING *SXNET_get_id_ulong(SXNET *sx, unsigned long lzone)
{
	ASN1_INTEGER *izone = NULL;
	ASN1_OCTET_STRING *oct;
	if(!(izone = ASN1_INTEGER_new()) || !ASN1_INTEGER_set(izone, lzone)) {
		X509V3err(X509V3_F_SXNET_GET_ID_ULONG,ERR_R_MALLOC_FAILURE);
		ASN1_INTEGER_free(izone);
		return NULL;
	}
	oct = SXNET_get_id_INTEGER(sx, izone);
	ASN1_INTEGER_free(oct);
	return oct;
}
['ASN1_OCTET_STRING *SXNET_get_id_ulong(SXNET *sx, unsigned long lzone)\n{\n\tASN1_INTEGER *izone = NULL;\n\tASN1_OCTET_STRING *oct;\n\tif(!(izone = ASN1_INTEGER_new()) || !ASN1_INTEGER_set(izone, lzone)) {\n\t\tX509V3err(X509V3_F_SXNET_GET_ID_ULONG,ERR_R_MALLOC_FAILURE);\n\t\tASN1_INTEGER_free(izone);\n\t\treturn NULL;\n\t}\n\toct = SXNET_get_id_INTEGER(sx, izone);\n\tASN1_INTEGER_free(oct);\n\treturn oct;\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}']