crypto/x509v3/v3_utl.c:149: error: MEMORY_LEAK
  memory dynamically allocated by call to `BN_new()` at line 144, column 7 is not reachable after line 149, column 6.
Showing all 14 steps of the trace


crypto/x509v3/v3_utl.c:140:1: start of procedure s2i_ASN1_INTEGER()
138.   }
139.   
140. > ASN1_INTEGER *s2i_ASN1_INTEGER(X509V3_EXT_METHOD *method, char *value)
141.   {
142.   	BIGNUM *bn = NULL;

crypto/x509v3/v3_utl.c:142:2: 
140.   ASN1_INTEGER *s2i_ASN1_INTEGER(X509V3_EXT_METHOD *method, char *value)
141.   {
142. > 	BIGNUM *bn = NULL;
143.   	ASN1_INTEGER *aint;
144.   	bn = BN_new();

crypto/x509v3/v3_utl.c:144:2: 
142.   	BIGNUM *bn = NULL;
143.   	ASN1_INTEGER *aint;
144. > 	bn = BN_new();
145.   	if(!value) {
146.   		X509V3err(X509V3_F_S2I_ASN1_INTEGER,X509V3_R_INVALID_NULL_VALUE);

crypto/bn/bn_lib.c:290:1: start of procedure BN_new()
  288.   	}
  289.   
  290. > BIGNUM *BN_new(void)
  291.   	{
  292.   	BIGNUM *ret;

crypto/bn/bn_lib.c:294:6: Taking false branch
  292.   	BIGNUM *ret;
  293.   
  294.   	if ((ret=(BIGNUM *)Malloc(sizeof(BIGNUM))) == NULL)
              ^
  295.   		{
  296.   		BNerr(BN_F_BN_NEW,ERR_R_MALLOC_FAILURE);

crypto/bn/bn_lib.c:299:2: 
  297.   		return(NULL);
  298.   		}
  299. > 	ret->flags=BN_FLG_MALLOCED;
  300.   	ret->top=0;
  301.   	ret->neg=0;

crypto/bn/bn_lib.c:300:2: 
  298.   		}
  299.   	ret->flags=BN_FLG_MALLOCED;
  300. > 	ret->top=0;
  301.   	ret->neg=0;
  302.   	ret->max=0;

crypto/bn/bn_lib.c:301:2: 
  299.   	ret->flags=BN_FLG_MALLOCED;
  300.   	ret->top=0;
  301. > 	ret->neg=0;
  302.   	ret->max=0;
  303.   	ret->d=NULL;

crypto/bn/bn_lib.c:302:2: 
  300.   	ret->top=0;
  301.   	ret->neg=0;
  302. > 	ret->max=0;
  303.   	ret->d=NULL;
  304.   	return(ret);

crypto/bn/bn_lib.c:303:2: 
  301.   	ret->neg=0;
  302.   	ret->max=0;
  303. > 	ret->d=NULL;
  304.   	return(ret);
  305.   	}

crypto/bn/bn_lib.c:304:2: 
  302.   	ret->max=0;
  303.   	ret->d=NULL;
  304. > 	return(ret);
  305.   	}
  306.   

crypto/bn/bn_lib.c:305:2: return from a call to BN_new
  303.   	ret->d=NULL;
  304.   	return(ret);
  305.   	}
          ^
  306.   
  307.   

crypto/x509v3/v3_utl.c:145:6: Taking false branch
143.   	ASN1_INTEGER *aint;
144.   	bn = BN_new();
145.   	if(!value) {
            ^
146.   		X509V3err(X509V3_F_S2I_ASN1_INTEGER,X509V3_R_INVALID_NULL_VALUE);
147.   		return 0;

crypto/x509v3/v3_utl.c:149:6: Skipping BN_dec2bn(): empty list of specs
147.   		return 0;
148.   	}
149.   	if(!BN_dec2bn(&bn, value)) {
            ^
150.   		X509V3err(X509V3_F_S2I_ASN1_INTEGER,X509V3_R_BN_DEC2BN_ERROR);
151.   		return 0;

ASN1_INTEGER *s2i_ASN1_INTEGER(X509V3_EXT_METHOD *method, char *value)
{
	BIGNUM *bn = NULL;
	ASN1_INTEGER *aint;
	bn = BN_new();
	if(!value) {
		X509V3err(X509V3_F_S2I_ASN1_INTEGER,X509V3_R_INVALID_NULL_VALUE);
		return 0;
	}
	if(!BN_dec2bn(&bn, value)) {
		X509V3err(X509V3_F_S2I_ASN1_INTEGER,X509V3_R_BN_DEC2BN_ERROR);
		return 0;
	}
	if(!(aint = BN_to_ASN1_INTEGER(bn, NULL))) {
		X509V3err(X509V3_F_S2I_ASN1_INTEGER,X509V3_R_BN_TO_ASN1_INTEGER_ERROR);
		return 0;
	}
	BN_free(bn);
	return aint;
}
['ASN1_INTEGER *s2i_ASN1_INTEGER(X509V3_EXT_METHOD *method, char *value)\n{\n\tBIGNUM *bn = NULL;\n\tASN1_INTEGER *aint;\n\tbn = BN_new();\n\tif(!value) {\n\t\tX509V3err(X509V3_F_S2I_ASN1_INTEGER,X509V3_R_INVALID_NULL_VALUE);\n\t\treturn 0;\n\t}\n\tif(!BN_dec2bn(&bn, value)) {\n\t\tX509V3err(X509V3_F_S2I_ASN1_INTEGER,X509V3_R_BN_DEC2BN_ERROR);\n\t\treturn 0;\n\t}\n\tif(!(aint = BN_to_ASN1_INTEGER(bn, NULL))) {\n\t\tX509V3err(X509V3_F_S2I_ASN1_INTEGER,X509V3_R_BN_TO_ASN1_INTEGER_ERROR);\n\t\treturn 0;\n\t}\n\tBN_free(bn);\n\treturn aint;\n}', 'BIGNUM *BN_new(void)\n\t{\n\tBIGNUM *ret;\n\tif ((ret=(BIGNUM *)Malloc(sizeof(BIGNUM))) == NULL)\n\t\t{\n\t\tBNerr(BN_F_BN_NEW,ERR_R_MALLOC_FAILURE);\n\t\treturn(NULL);\n\t\t}\n\tret->flags=BN_FLG_MALLOCED;\n\tret->top=0;\n\tret->neg=0;\n\tret->max=0;\n\tret->d=NULL;\n\treturn(ret);\n\t}']