crypto/ec/ec_lib.c:335: error: MEMORY_LEAK
  memory dynamically allocated by call to `EC_POINT_new()` at line 311, column 28 is not reachable after line 335, column 5.
Showing all 54 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:560:1: start of procedure EC_POINT_new()
  558.   /* functions for EC_POINT objects */
  559.   
  560. > EC_POINT *EC_POINT_new(const EC_GROUP *group)
  561.   {
  562.       EC_POINT *ret;

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

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

crypto/ec/ec_lib.c:573:5: 
  571.       }
  572.   
  573. >     ret = OPENSSL_malloc(sizeof(*ret));
  574.       if (ret == NULL) {
  575.           ECerr(EC_F_EC_POINT_NEW, ERR_R_MALLOC_FAILURE);

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

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

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

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

crypto/ec/ec_lib.c:587:1: return from a call to EC_POINT_new
  585.   
  586.       return ret;
  587. > }
  588.   
  589.   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:611:1: start of procedure EC_POINT_copy()
  609.   }
  610.   
  611. > int EC_POINT_copy(EC_POINT *dest, const EC_POINT *src)
  612.   {
  613.       if (dest->meth->point_copy == 0) {

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

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

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

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

crypto/ec/ec_lib.c:624:1: return from a call to EC_POINT_copy
  622.           return 1;
  623.       return dest->meth->point_copy(dest, src);
  624. > }
  625.   
  626.   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 false branch
316.           return 0;
317.   
318.       if (order != NULL) {
               ^
319.           if (!BN_copy(group->order, order))
320.               return 0;

crypto/ec/ec_lib.c:322:9: 
320.               return 0;
321.       } else
322. >         BN_zero(group->order);
323.   
324.       if (cofactor != NULL) {

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

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

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

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

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

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

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

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

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

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:529:1: start of procedure BN_set_word()
  527.   }
  528.   
  529. > int BN_set_word(BIGNUM *a, BN_ULONG w)
  530.   {
  531.       bn_check_top(a);

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

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

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

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

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

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

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

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

crypto/ec/ec_lib.c:335:5: Skipping ec_precompute_mont_data(): empty list of specs
333.        * |group->mont_data| will be NULL in this case.
334.        */
335.       ec_precompute_mont_data(group);
           ^
336.   
337.       return 1;
