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


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

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

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

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

crypto/ec/ec_lib.c:561:1: start of procedure EC_POINT_new()
  559.   /* functions for EC_POINT objects */
  560.   
  561. > EC_POINT *EC_POINT_new(const EC_GROUP *group)
  562.   {
  563.       EC_POINT *ret;

crypto/ec/ec_lib.c:565:9: Taking false branch
  563.       EC_POINT *ret;
  564.   
  565.       if (group == NULL) {
                 ^
  566.           ECerr(EC_F_EC_POINT_NEW, ERR_R_PASSED_NULL_PARAMETER);
  567.           return NULL;

crypto/ec/ec_lib.c:569:9: Taking false branch
  567.           return NULL;
  568.       }
  569.       if (group->meth->point_init == 0) {
                 ^
  570.           ECerr(EC_F_EC_POINT_NEW, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  571.           return NULL;

crypto/ec/ec_lib.c:574:5: 
  572.       }
  573.   
  574. >     ret = OPENSSL_malloc(sizeof(*ret));
  575.       if (ret == NULL) {
  576.           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:575:9: Taking false branch
  573.   
  574.       ret = OPENSSL_malloc(sizeof(*ret));
  575.       if (ret == NULL) {
                 ^
  576.           ECerr(EC_F_EC_POINT_NEW, ERR_R_MALLOC_FAILURE);
  577.           return NULL;

crypto/ec/ec_lib.c:580:5: 
  578.       }
  579.   
  580. >     ret->meth = group->meth;
  581.   
  582.       if (!ret->meth->point_init(ret)) {

crypto/ec/ec_lib.c:582:10: Taking false branch
  580.       ret->meth = group->meth;
  581.   
  582.       if (!ret->meth->point_init(ret)) {
                  ^
  583.           OPENSSL_free(ret);
  584.           return NULL;

crypto/ec/ec_lib.c:587:5: 
  585.       }
  586.   
  587. >     return ret;
  588.   }
  589.   

crypto/ec/ec_lib.c:588:1: return from a call to EC_POINT_new
  586.   
  587.       return ret;
  588. > }
  589.   
  590.   void EC_POINT_free(EC_POINT *point)

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

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

crypto/ec/ec_lib.c:612:1: start of procedure EC_POINT_copy()
  610.   }
  611.   
  612. > int EC_POINT_copy(EC_POINT *dest, const EC_POINT *src)
  613.   {
  614.       if (dest->meth->point_copy == 0) {

crypto/ec/ec_lib.c:614:9: Taking false branch
  612.   int EC_POINT_copy(EC_POINT *dest, const EC_POINT *src)
  613.   {
  614.       if (dest->meth->point_copy == 0) {
                 ^
  615.           ECerr(EC_F_EC_POINT_COPY, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  616.           return 0;

crypto/ec/ec_lib.c:618:9: Taking false branch
  616.           return 0;
  617.       }
  618.       if (dest->meth != src->meth) {
                 ^
  619.           ECerr(EC_F_EC_POINT_COPY, EC_R_INCOMPATIBLE_OBJECTS);
  620.           return 0;

crypto/ec/ec_lib.c:622:9: Taking false branch
  620.           return 0;
  621.       }
  622.       if (dest == src)
                 ^
  623.           return 1;
  624.       return dest->meth->point_copy(dest, src);

crypto/ec/ec_lib.c:624:5: Skipping __function_pointer__(): unresolved function pointer
  622.       if (dest == src)
  623.           return 1;
  624.       return dest->meth->point_copy(dest, src);
             ^
  625.   }
  626.   

crypto/ec/ec_lib.c:625:1: return from a call to EC_POINT_copy
  623.           return 1;
  624.       return dest->meth->point_copy(dest, src);
  625. > }
  626.   
  627.   EC_POINT *EC_POINT_dup(const EC_POINT *a, const EC_GROUP *group)

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

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

crypto/ec/ec_lib.c:323:9: 
321.               return 0;
322.       } else
323. >         BN_zero(group->order);
324.   
325.       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:325:9: Taking false branch
323.           BN_zero(group->order);
324.   
325.       if (cofactor != NULL) {
               ^
326.           if (!BN_copy(group->cofactor, cofactor))
327.               return 0;

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

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:336:5: Skipping ec_precompute_mont_data(): empty list of specs
334.        * |group->mont_data| will be NULL in this case.
335.        */
336.       ec_precompute_mont_data(group);
           ^
337.   
338.       return 1;
