crypto/x509v3/v3_utl.c:201: error: MEMORY_LEAK
  memory dynamically allocated by call to `BN_new()` at line 183, column 10 is not reachable after line 201, column 15.
Showing all 34 steps of the trace


crypto/x509v3/v3_utl.c:173:1: start of procedure s2i_ASN1_INTEGER()
171.   }
172.   
173. > ASN1_INTEGER *s2i_ASN1_INTEGER(X509V3_EXT_METHOD *method, char *value)
174.   {
175.       BIGNUM *bn = NULL;

crypto/x509v3/v3_utl.c:175:5: 
173.   ASN1_INTEGER *s2i_ASN1_INTEGER(X509V3_EXT_METHOD *method, char *value)
174.   {
175. >     BIGNUM *bn = NULL;
176.       ASN1_INTEGER *aint;
177.       int isneg, ishex;

crypto/x509v3/v3_utl.c:179:9: Taking false branch
177.       int isneg, ishex;
178.       int ret;
179.       if (value == NULL) {
               ^
180.           X509V3err(X509V3_F_S2I_ASN1_INTEGER, X509V3_R_INVALID_NULL_VALUE);
181.           return NULL;

crypto/x509v3/v3_utl.c:183:5: 
181.           return NULL;
182.       }
183. >     bn = BN_new();
184.       if (bn == NULL) {
185.           X509V3err(X509V3_F_S2I_ASN1_INTEGER, ERR_R_MALLOC_FAILURE);

crypto/bn/bn_lib.c:277:1: start of procedure BN_new()
  275.   }
  276.   
  277. > BIGNUM *BN_new(void)
  278.   {
  279.       BIGNUM *ret;

crypto/bn/bn_lib.c:281:9: 
  279.       BIGNUM *ret;
  280.   
  281. >     if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
  282.           BNerr(BN_F_BN_NEW, ERR_R_MALLOC_FAILURE);
  283.           return (NULL);

crypto/mem.c:157:1: start of procedure CRYPTO_zalloc()
    155.   }
    156.   
    157. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
    158.   {
    159.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:159:5: 
    157.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
    158.   {
    159. >     void *ret = CRYPTO_malloc(num, file, line);
    160.   
    161.       if (ret != NULL)

crypto/mem.c:120:1: start of procedure CRYPTO_malloc()
      118.   }
      119.   
      120. > void *CRYPTO_malloc(size_t num, const char *file, int line)
      121.   {
      122.       void *ret = NULL;

crypto/mem.c:122:5: 
      120.   void *CRYPTO_malloc(size_t num, const char *file, int line)
      121.   {
      122. >     void *ret = NULL;
      123.   
      124.       if (num <= 0)

crypto/mem.c:124:9: Taking false branch
      122.       void *ret = NULL;
      123.   
      124.       if (num <= 0)
                     ^
      125.           return NULL;
      126.   

crypto/mem.c:127:5: 
      125.           return NULL;
      126.   
      127. >     allow_customize = 0;
      128.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
      129.       if (call_malloc_debug) {

crypto/mem.c:137:5: 
      135.       }
      136.   #else
      137. >     (void)file;
      138.       (void)line;
      139.       ret = malloc(num);

crypto/mem.c:138:5: 
      136.   #else
      137.       (void)file;
      138. >     (void)line;
      139.       ret = malloc(num);
      140.   #endif

crypto/mem.c:139:5: 
      137.       (void)file;
      138.       (void)line;
      139. >     ret = malloc(num);
      140.   #endif
      141.   

crypto/mem.c:154:5: 
      152.   #endif
      153.   
      154. >     return ret;
      155.   }
      156.   

crypto/mem.c:155:1: return from a call to CRYPTO_malloc
      153.   
      154.       return ret;
      155. > }
      156.   
      157.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:161:9: Taking true branch
    159.       void *ret = CRYPTO_malloc(num, file, line);
    160.   
    161.       if (ret != NULL)
                   ^
    162.           memset(ret, 0, num);
    163.       return ret;

crypto/mem.c:162:9: 
    160.   
    161.       if (ret != NULL)
    162. >         memset(ret, 0, num);
    163.       return ret;
    164.   }

crypto/mem.c:163:5: 
    161.       if (ret != NULL)
    162.           memset(ret, 0, num);
    163. >     return ret;
    164.   }
    165.   

crypto/mem.c:164:1: return from a call to CRYPTO_zalloc
    162.           memset(ret, 0, num);
    163.       return ret;
    164. > }
    165.   
    166.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/bn/bn_lib.c:281:9: Taking false branch
  279.       BIGNUM *ret;
  280.   
  281.       if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
                 ^
  282.           BNerr(BN_F_BN_NEW, ERR_R_MALLOC_FAILURE);
  283.           return (NULL);

crypto/bn/bn_lib.c:285:5: 
  283.           return (NULL);
  284.       }
  285. >     ret->flags = BN_FLG_MALLOCED;
  286.       bn_check_top(ret);
  287.       return (ret);

crypto/bn/bn_lib.c:287:5: 
  285.       ret->flags = BN_FLG_MALLOCED;
  286.       bn_check_top(ret);
  287. >     return (ret);
  288.   }
  289.   

crypto/bn/bn_lib.c:288:1: return from a call to BN_new
  286.       bn_check_top(ret);
  287.       return (ret);
  288. > }
  289.   
  290.    BIGNUM *BN_secure_new(void)

crypto/x509v3/v3_utl.c:184:9: Taking false branch
182.       }
183.       bn = BN_new();
184.       if (bn == NULL) {
               ^
185.           X509V3err(X509V3_F_S2I_ASN1_INTEGER, ERR_R_MALLOC_FAILURE);
186.           return NULL;

crypto/x509v3/v3_utl.c:188:9: Taking false branch
186.           return NULL;
187.       }
188.       if (value[0] == '-') {
               ^
189.           value++;
190.           isneg = 1;

crypto/x509v3/v3_utl.c:192:9: 
190.           isneg = 1;
191.       } else
192. >         isneg = 0;
193.   
194.       if (value[0] == '0' && ((value[1] == 'x') || (value[1] == 'X'))) {

crypto/x509v3/v3_utl.c:194:9: Taking true branch
192.           isneg = 0;
193.   
194.       if (value[0] == '0' && ((value[1] == 'x') || (value[1] == 'X'))) {
               ^
195.           value += 2;
196.           ishex = 1;

crypto/x509v3/v3_utl.c:194:30: Taking true branch
192.           isneg = 0;
193.   
194.       if (value[0] == '0' && ((value[1] == 'x') || (value[1] == 'X'))) {
                                    ^
195.           value += 2;
196.           ishex = 1;

crypto/x509v3/v3_utl.c:195:9: 
193.   
194.       if (value[0] == '0' && ((value[1] == 'x') || (value[1] == 'X'))) {
195. >         value += 2;
196.           ishex = 1;
197.       } else

crypto/x509v3/v3_utl.c:196:9: 
194.       if (value[0] == '0' && ((value[1] == 'x') || (value[1] == 'X'))) {
195.           value += 2;
196. >         ishex = 1;
197.       } else
198.           ishex = 0;

crypto/x509v3/v3_utl.c:200:9: Taking true branch
198.           ishex = 0;
199.   
200.       if (ishex)
               ^
201.           ret = BN_hex2bn(&bn, value);
202.       else

crypto/x509v3/v3_utl.c:201:9: Skipping BN_hex2bn(): empty list of specs
199.   
200.       if (ishex)
201.           ret = BN_hex2bn(&bn, value);
               ^
202.       else
203.           ret = BN_dec2bn(&bn, value);
