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


crypto/ec/ec_lib.c:265:1: start of procedure EC_GROUP_set_generator()
263.   }
264.   
265. > int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
266.                              const BIGNUM *order, const BIGNUM *cofactor)
267.   {

crypto/ec/ec_lib.c:268:9: Taking false branch
266.                              const BIGNUM *order, const BIGNUM *cofactor)
267.   {
268.       if (generator == NULL) {
               ^
269.           ECerr(EC_F_EC_GROUP_SET_GENERATOR, ERR_R_PASSED_NULL_PARAMETER);
270.           return 0;

crypto/ec/ec_lib.c:273:9: Taking true branch
271.       }
272.   
273.       if (group->generator == NULL) {
               ^
274.           group->generator = EC_POINT_new(group);
275.           if (group->generator == NULL)

crypto/ec/ec_lib.c:274:9: 
272.   
273.       if (group->generator == NULL) {
274. >         group->generator = EC_POINT_new(group);
275.           if (group->generator == NULL)
276.               return 0;

crypto/ec/ec_lib.c:668:1: start of procedure EC_POINT_new()
  666.   /* functions for EC_POINT objects */
  667.   
  668. > EC_POINT *EC_POINT_new(const EC_GROUP *group)
  669.   {
  670.       EC_POINT *ret;

crypto/ec/ec_lib.c:672:9: Taking false branch
  670.       EC_POINT *ret;
  671.   
  672.       if (group == NULL) {
                 ^
  673.           ECerr(EC_F_EC_POINT_NEW, ERR_R_PASSED_NULL_PARAMETER);
  674.           return NULL;

crypto/ec/ec_lib.c:676:9: Taking false branch
  674.           return NULL;
  675.       }
  676.       if (group->meth->point_init == 0) {
                 ^
  677.           ECerr(EC_F_EC_POINT_NEW, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  678.           return NULL;

crypto/ec/ec_lib.c:681:5: 
  679.       }
  680.   
  681. >     ret = OPENSSL_malloc(sizeof(*ret));
  682.       if (ret == NULL) {
  683.           ECerr(EC_F_EC_POINT_NEW, ERR_R_MALLOC_FAILURE);

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/ec/ec_lib.c:682:9: Taking false branch
  680.   
  681.       ret = OPENSSL_malloc(sizeof(*ret));
  682.       if (ret == NULL) {
                 ^
  683.           ECerr(EC_F_EC_POINT_NEW, ERR_R_MALLOC_FAILURE);
  684.           return NULL;

crypto/ec/ec_lib.c:687:5: 
  685.       }
  686.   
  687. >     ret->meth = group->meth;
  688.   
  689.       if (!ret->meth->point_init(ret)) {

crypto/ec/ec_lib.c:689:10: Taking false branch
  687.       ret->meth = group->meth;
  688.   
  689.       if (!ret->meth->point_init(ret)) {
                  ^
  690.           OPENSSL_free(ret);
  691.           return NULL;

crypto/ec/ec_lib.c:694:5: 
  692.       }
  693.   
  694. >     return ret;
  695.   }
  696.   

crypto/ec/ec_lib.c:695:1: return from a call to EC_POINT_new
  693.   
  694.       return ret;
  695. > }
  696.   
  697.   void EC_POINT_free(EC_POINT *point)

crypto/ec/ec_lib.c:275:13: Taking false branch
273.       if (group->generator == NULL) {
274.           group->generator = EC_POINT_new(group);
275.           if (group->generator == NULL)
                   ^
276.               return 0;
277.       }

crypto/ec/ec_lib.c:278:10: 
276.               return 0;
277.       }
278. >     if (!EC_POINT_copy(group->generator, generator))
279.           return 0;
280.   

crypto/ec/ec_lib.c:719:1: start of procedure EC_POINT_copy()
  717.   }
  718.   
  719. > int EC_POINT_copy(EC_POINT *dest, const EC_POINT *src)
  720.   {
  721.       if (dest->meth->point_copy == 0) {

crypto/ec/ec_lib.c:721:9: Taking false branch
  719.   int EC_POINT_copy(EC_POINT *dest, const EC_POINT *src)
  720.   {
  721.       if (dest->meth->point_copy == 0) {
                 ^
  722.           ECerr(EC_F_EC_POINT_COPY, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  723.           return 0;

crypto/ec/ec_lib.c:725:9: Taking false branch
  723.           return 0;
  724.       }
  725.       if (dest->meth != src->meth) {
                 ^
  726.           ECerr(EC_F_EC_POINT_COPY, EC_R_INCOMPATIBLE_OBJECTS);
  727.           return 0;

crypto/ec/ec_lib.c:729:9: Taking false branch
  727.           return 0;
  728.       }
  729.       if (dest == src)
                 ^
  730.           return 1;
  731.       return dest->meth->point_copy(dest, src);

crypto/ec/ec_lib.c:731:5: Skipping __function_pointer__(): unresolved function pointer
  729.       if (dest == src)
  730.           return 1;
  731.       return dest->meth->point_copy(dest, src);
             ^
  732.   }
  733.   

crypto/ec/ec_lib.c:732:1: return from a call to EC_POINT_copy
  730.           return 1;
  731.       return dest->meth->point_copy(dest, src);
  732. > }
  733.   
  734.   EC_POINT *EC_POINT_dup(const EC_POINT *a, const EC_GROUP *group)

crypto/ec/ec_lib.c:278:10: Taking false branch
276.               return 0;
277.       }
278.       if (!EC_POINT_copy(group->generator, generator))
                ^
279.           return 0;
280.   

crypto/ec/ec_lib.c:281:9: Taking false branch
279.           return 0;
280.   
281.       if (order != NULL) {
               ^
282.           if (!BN_copy(group->order, order))
283.               return 0;

crypto/ec/ec_lib.c:285:9: 
283.               return 0;
284.       } else
285. >         BN_zero(group->order);
286.   
287.       if (cofactor != NULL) {

crypto/bn/bn_lib.c:530:1: start of procedure BN_set_word()
  528.   }
  529.   
  530. > int BN_set_word(BIGNUM *a, BN_ULONG w)
  531.   {
  532.       bn_check_top(a);

crypto/bn/bn_lib.c:533:9: Condition is true
  531.   {
  532.       bn_check_top(a);
  533.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                 ^
  534.           return (0);
  535.       a->neg = 0;

crypto/bn/bn_lib.c:533:9: Taking false branch
  531.   {
  532.       bn_check_top(a);
  533.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                 ^
  534.           return (0);
  535.       a->neg = 0;

crypto/bn/bn_lib.c:535:5: 
  533.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
  534.           return (0);
  535. >     a->neg = 0;
  536.       a->d[0] = w;
  537.       a->top = (w ? 1 : 0);

crypto/bn/bn_lib.c:536:5: 
  534.           return (0);
  535.       a->neg = 0;
  536. >     a->d[0] = w;
  537.       a->top = (w ? 1 : 0);
  538.       bn_check_top(a);

crypto/bn/bn_lib.c:537:15: Condition is false
  535.       a->neg = 0;
  536.       a->d[0] = w;
  537.       a->top = (w ? 1 : 0);
                       ^
  538.       bn_check_top(a);
  539.       return (1);

crypto/bn/bn_lib.c:537:5: 
  535.       a->neg = 0;
  536.       a->d[0] = w;
  537. >     a->top = (w ? 1 : 0);
  538.       bn_check_top(a);
  539.       return (1);

crypto/bn/bn_lib.c:539:5: 
  537.       a->top = (w ? 1 : 0);
  538.       bn_check_top(a);
  539. >     return (1);
  540.   }
  541.   

crypto/bn/bn_lib.c:540:1: return from a call to BN_set_word
  538.       bn_check_top(a);
  539.       return (1);
  540. > }
  541.   
  542.   BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)

crypto/ec/ec_lib.c:287:9: Taking false branch
285.           BN_zero(group->order);
286.   
287.       if (cofactor != NULL) {
               ^
288.           if (!BN_copy(group->cofactor, cofactor))
289.               return 0;

crypto/ec/ec_lib.c:291:9: 
289.               return 0;
290.       } else
291. >         BN_zero(group->cofactor);
292.   
293.       /*

crypto/bn/bn_lib.c:530:1: start of procedure BN_set_word()
  528.   }
  529.   
  530. > int BN_set_word(BIGNUM *a, BN_ULONG w)
  531.   {
  532.       bn_check_top(a);

crypto/bn/bn_lib.c:533:9: Condition is true
  531.   {
  532.       bn_check_top(a);
  533.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                 ^
  534.           return (0);
  535.       a->neg = 0;

crypto/bn/bn_lib.c:533:9: Taking false branch
  531.   {
  532.       bn_check_top(a);
  533.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                 ^
  534.           return (0);
  535.       a->neg = 0;

crypto/bn/bn_lib.c:535:5: 
  533.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
  534.           return (0);
  535. >     a->neg = 0;
  536.       a->d[0] = w;
  537.       a->top = (w ? 1 : 0);

crypto/bn/bn_lib.c:536:5: 
  534.           return (0);
  535.       a->neg = 0;
  536. >     a->d[0] = w;
  537.       a->top = (w ? 1 : 0);
  538.       bn_check_top(a);

crypto/bn/bn_lib.c:537:15: Condition is false
  535.       a->neg = 0;
  536.       a->d[0] = w;
  537.       a->top = (w ? 1 : 0);
                       ^
  538.       bn_check_top(a);
  539.       return (1);

crypto/bn/bn_lib.c:537:5: 
  535.       a->neg = 0;
  536.       a->d[0] = w;
  537. >     a->top = (w ? 1 : 0);
  538.       bn_check_top(a);
  539.       return (1);

crypto/bn/bn_lib.c:539:5: 
  537.       a->top = (w ? 1 : 0);
  538.       bn_check_top(a);
  539. >     return (1);
  540.   }
  541.   

crypto/bn/bn_lib.c:540:1: return from a call to BN_set_word
  538.       bn_check_top(a);
  539.       return (1);
  540. > }
  541.   
  542.   BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)

crypto/ec/ec_lib.c:298:5: Skipping ec_precompute_mont_data(): empty list of specs
296.        * |group->mont_data| will be NULL in this case.
297.        */
298.       ec_precompute_mont_data(group);
           ^
299.   
300.       return 1;
