crypto/ec/ec_lib.c:337: error: MEMORY_LEAK
  memory dynamically allocated by call to `EC_POINT_new()` at line 311, column 28 is not reachable after line 337, column 16.
Showing all 59 steps of the trace


crypto/ec/ec_lib.c:302:1: start of procedure EC_GROUP_set_generator()
300.   }
301.   
302. > int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
303.                              const BIGNUM *order, const BIGNUM *cofactor)
304.   {

crypto/ec/ec_lib.c:305:9: Taking false branch
303.                              const BIGNUM *order, const BIGNUM *cofactor)
304.   {
305.       if (generator == NULL) {
               ^
306.           ECerr(EC_F_EC_GROUP_SET_GENERATOR, ERR_R_PASSED_NULL_PARAMETER);
307.           return 0;

crypto/ec/ec_lib.c:310:9: Taking true branch
308.       }
309.   
310.       if (group->generator == NULL) {
               ^
311.           group->generator = EC_POINT_new(group);
312.           if (group->generator == NULL)

crypto/ec/ec_lib.c:311:9: 
309.   
310.       if (group->generator == NULL) {
311. >         group->generator = EC_POINT_new(group);
312.           if (group->generator == NULL)
313.               return 0;

crypto/ec/ec_lib.c:589:1: start of procedure EC_POINT_new()
  587.   /* functions for EC_POINT objects */
  588.   
  589. > EC_POINT *EC_POINT_new(const EC_GROUP *group)
  590.   {
  591.       EC_POINT *ret;

crypto/ec/ec_lib.c:593:9: Taking false branch
  591.       EC_POINT *ret;
  592.   
  593.       if (group == NULL) {
                 ^
  594.           ECerr(EC_F_EC_POINT_NEW, ERR_R_PASSED_NULL_PARAMETER);
  595.           return NULL;

crypto/ec/ec_lib.c:597:9: Taking false branch
  595.           return NULL;
  596.       }
  597.       if (group->meth->point_init == 0) {
                 ^
  598.           ECerr(EC_F_EC_POINT_NEW, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  599.           return NULL;

crypto/ec/ec_lib.c:602:5: 
  600.       }
  601.   
  602. >     ret = OPENSSL_zalloc(sizeof(*ret));
  603.       if (ret == NULL) {
  604.           ECerr(EC_F_EC_POINT_NEW, ERR_R_MALLOC_FAILURE);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

crypto/ec/ec_lib.c:603:9: Taking false branch
  601.   
  602.       ret = OPENSSL_zalloc(sizeof(*ret));
  603.       if (ret == NULL) {
                 ^
  604.           ECerr(EC_F_EC_POINT_NEW, ERR_R_MALLOC_FAILURE);
  605.           return NULL;

crypto/ec/ec_lib.c:608:5: 
  606.       }
  607.   
  608. >     ret->meth = group->meth;
  609.   
  610.       if (!ret->meth->point_init(ret)) {

crypto/ec/ec_lib.c:610:10: Taking false branch
  608.       ret->meth = group->meth;
  609.   
  610.       if (!ret->meth->point_init(ret)) {
                  ^
  611.           OPENSSL_free(ret);
  612.           return NULL;

crypto/ec/ec_lib.c:615:5: 
  613.       }
  614.   
  615. >     return ret;
  616.   }
  617.   

crypto/ec/ec_lib.c:616:1: return from a call to EC_POINT_new
  614.   
  615.       return ret;
  616. > }
  617.   
  618.   void EC_POINT_free(EC_POINT *point)

crypto/ec/ec_lib.c:312:13: Taking false branch
310.       if (group->generator == NULL) {
311.           group->generator = EC_POINT_new(group);
312.           if (group->generator == NULL)
                   ^
313.               return 0;
314.       }

crypto/ec/ec_lib.c:315:10: 
313.               return 0;
314.       }
315. >     if (!EC_POINT_copy(group->generator, generator))
316.           return 0;
317.   

crypto/ec/ec_lib.c:640:1: start of procedure EC_POINT_copy()
  638.   }
  639.   
  640. > int EC_POINT_copy(EC_POINT *dest, const EC_POINT *src)
  641.   {
  642.       if (dest->meth->point_copy == 0) {

crypto/ec/ec_lib.c:642:9: Taking false branch
  640.   int EC_POINT_copy(EC_POINT *dest, const EC_POINT *src)
  641.   {
  642.       if (dest->meth->point_copy == 0) {
                 ^
  643.           ECerr(EC_F_EC_POINT_COPY, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  644.           return 0;

crypto/ec/ec_lib.c:646:9: Taking false branch
  644.           return 0;
  645.       }
  646.       if (dest->meth != src->meth) {
                 ^
  647.           ECerr(EC_F_EC_POINT_COPY, EC_R_INCOMPATIBLE_OBJECTS);
  648.           return 0;

crypto/ec/ec_lib.c:650:9: Taking false branch
  648.           return 0;
  649.       }
  650.       if (dest == src)
                 ^
  651.           return 1;
  652.       return dest->meth->point_copy(dest, src);

crypto/ec/ec_lib.c:652:5: Skipping __function_pointer__(): unresolved function pointer
  650.       if (dest == src)
  651.           return 1;
  652.       return dest->meth->point_copy(dest, src);
             ^
  653.   }
  654.   

crypto/ec/ec_lib.c:653:1: return from a call to EC_POINT_copy
  651.           return 1;
  652.       return dest->meth->point_copy(dest, src);
  653. > }
  654.   
  655.   EC_POINT *EC_POINT_dup(const EC_POINT *a, const EC_GROUP *group)

crypto/ec/ec_lib.c:315:10: Taking false branch
313.               return 0;
314.       }
315.       if (!EC_POINT_copy(group->generator, generator))
                ^
316.           return 0;
317.   

crypto/ec/ec_lib.c:318:9: Taking true branch
316.           return 0;
317.   
318.       if (order != NULL) {
               ^
319.           if (!BN_copy(group->order, order))
320.               return 0;

crypto/ec/ec_lib.c:319:14: Taking false branch
317.   
318.       if (order != NULL) {
319.           if (!BN_copy(group->order, order))
                    ^
320.               return 0;
321.       } else

crypto/ec/ec_lib.c:324:9: Taking false branch
322.           BN_zero(group->order);
323.   
324.       if (cofactor != NULL) {
               ^
325.           if (!BN_copy(group->cofactor, cofactor))
326.               return 0;

crypto/ec/ec_lib.c:328:9: 
326.               return 0;
327.       } else
328. >         BN_zero(group->cofactor);
329.   
330.    

crypto/bn/bn_lib.c:520:1: start of procedure BN_set_word()
  518.   }
  519.   
  520. > int BN_set_word(BIGNUM *a, BN_ULONG w)
  521.   {
  522.       bn_check_top(a);

crypto/bn/bn_lib.c:523:9: Condition is true
  521.   {
  522.       bn_check_top(a);
  523.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                 ^
  524.           return (0);
  525.       a->neg = 0;

crypto/bn/bn_lib.c:523:9: Taking false branch
  521.   {
  522.       bn_check_top(a);
  523.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                 ^
  524.           return (0);
  525.       a->neg = 0;

crypto/bn/bn_lib.c:525:5: 
  523.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
  524.           return (0);
  525. >     a->neg = 0;
  526.       a->d[0] = w;
  527.       a->top = (w ? 1 : 0);

crypto/bn/bn_lib.c:526:5: 
  524.           return (0);
  525.       a->neg = 0;
  526. >     a->d[0] = w;
  527.       a->top = (w ? 1 : 0);
  528.       bn_check_top(a);

crypto/bn/bn_lib.c:527:15: Condition is false
  525.       a->neg = 0;
  526.       a->d[0] = w;
  527.       a->top = (w ? 1 : 0);
                       ^
  528.       bn_check_top(a);
  529.       return (1);

crypto/bn/bn_lib.c:527:5: 
  525.       a->neg = 0;
  526.       a->d[0] = w;
  527. >     a->top = (w ? 1 : 0);
  528.       bn_check_top(a);
  529.       return (1);

crypto/bn/bn_lib.c:529:5: 
  527.       a->top = (w ? 1 : 0);
  528.       bn_check_top(a);
  529. >     return (1);
  530.   }
  531.   

crypto/bn/bn_lib.c:530:1: return from a call to BN_set_word
  528.       bn_check_top(a);
  529.       return (1);
  530. > }
  531.   
  532.   BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)

crypto/ec/ec_lib.c:336:9: 
334.        * |group->mont_data| will be NULL in this case.
335.        */
336. >     if (BN_is_odd(group->order)) {
337.           return ec_precompute_mont_data(group);
338.       }

crypto/bn/bn_lib.c:990:1: start of procedure BN_is_odd()
  988.   }
  989.   
  990. > int BN_is_odd(const BIGNUM *a)
  991.   {
  992.       return (a->top > 0) && (a->d[0] & 1);

crypto/bn/bn_lib.c:992:13: Condition is true
  990.   int BN_is_odd(const BIGNUM *a)
  991.   {
  992.       return (a->top > 0) && (a->d[0] & 1);
                     ^
  993.   }
  994.   

crypto/bn/bn_lib.c:992:29: Condition is true
  990.   int BN_is_odd(const BIGNUM *a)
  991.   {
  992.       return (a->top > 0) && (a->d[0] & 1);
                                     ^
  993.   }
  994.   

crypto/bn/bn_lib.c:992:12: 
  990.   int BN_is_odd(const BIGNUM *a)
  991.   {
  992. >     return (a->top > 0) && (a->d[0] & 1);
  993.   }
  994.   

crypto/bn/bn_lib.c:992:5: 
  990.   int BN_is_odd(const BIGNUM *a)
  991.   {
  992. >     return (a->top > 0) && (a->d[0] & 1);
  993.   }
  994.   

crypto/bn/bn_lib.c:993:1: return from a call to BN_is_odd
  991.   {
  992.       return (a->top > 0) && (a->d[0] & 1);
  993. > }
  994.   
  995.   int BN_is_negative(const BIGNUM *a)

crypto/ec/ec_lib.c:336:9: Taking true branch
334.        * |group->mont_data| will be NULL in this case.
335.        */
336.       if (BN_is_odd(group->order)) {
               ^
337.           return ec_precompute_mont_data(group);
338.       }

crypto/ec/ec_lib.c:337:9: Skipping ec_precompute_mont_data(): empty list of specs
335.        */
336.       if (BN_is_odd(group->order)) {
337.           return ec_precompute_mont_data(group);
               ^
338.       }
339.   
