crypto/rsa/rsa_mp.c:53: error: MEMORY_LEAK
  memory dynamically allocated by call to `CRYPTO_zalloc()` at line 35, column 13 is not reachable after line 53, column 5.
Showing all 55 steps of the trace


crypto/rsa/rsa_mp.c:30:1: start of procedure rsa_multip_info_new()
28.   }
29.   
30. > RSA_PRIME_INFO *rsa_multip_info_new(void)
31.   {
32.       RSA_PRIME_INFO *pinfo;

crypto/rsa/rsa_mp.c:35:5: 
33.   
34.       /* create a RSA_PRIME_INFO structure */
35. >     pinfo = OPENSSL_zalloc(sizeof(RSA_PRIME_INFO));
36.       if (pinfo == NULL)
37.           return NULL;

crypto/mem.c:218:1: start of procedure CRYPTO_zalloc()
  216.   }
  217.   
  218. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
  219.   {
  220.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:220:5: 
  218.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
  219.   {
  220. >     void *ret = CRYPTO_malloc(num, file, line);
  221.   
  222.       FAILTEST();

crypto/mem.c:189:1: start of procedure CRYPTO_malloc()
    187.   #endif
    188.   
    189. > void *CRYPTO_malloc(size_t num, const char *file, int line)
    190.   {
    191.       void *ret = NULL;

crypto/mem.c:191:5: 
    189.   void *CRYPTO_malloc(size_t num, const char *file, int line)
    190.   {
    191. >     void *ret = NULL;
    192.   
    193.       INCREMENT(malloc_count);

crypto/mem.c:194:9: Taking false branch
    192.   
    193.       INCREMENT(malloc_count);
    194.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                   ^
    195.           return malloc_impl(num, file, line);
    196.   

crypto/mem.c:197:9: Taking false branch
    195.           return malloc_impl(num, file, line);
    196.   
    197.       if (num == 0)
                   ^
    198.           return NULL;
    199.   

crypto/mem.c:201:5: 
    199.   
    200.       FAILTEST();
    201. >     allow_customize = 0;
    202.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
    203.       if (call_malloc_debug) {

crypto/mem.c:211:5: 
    209.       }
    210.   #else
    211. >     (void)(file); (void)(line);
    212.       ret = malloc(num);
    213.   #endif

crypto/mem.c:211:19: 
    209.       }
    210.   #else
    211. >     (void)(file); (void)(line);
    212.       ret = malloc(num);
    213.   #endif

crypto/mem.c:212:5: 
    210.   #else
    211.       (void)(file); (void)(line);
    212. >     ret = malloc(num);
    213.   #endif
    214.   

crypto/mem.c:215:5: 
    213.   #endif
    214.   
    215. >     return ret;
    216.   }
    217.   

crypto/mem.c:216:1: return from a call to CRYPTO_malloc
    214.   
    215.       return ret;
    216. > }
    217.   
    218.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:223:9: Taking true branch
  221.   
  222.       FAILTEST();
  223.       if (ret != NULL)
                 ^
  224.           memset(ret, 0, num);
  225.       return ret;

crypto/mem.c:224:9: 
  222.       FAILTEST();
  223.       if (ret != NULL)
  224. >         memset(ret, 0, num);
  225.       return ret;
  226.   }

crypto/mem.c:225:5: 
  223.       if (ret != NULL)
  224.           memset(ret, 0, num);
  225. >     return ret;
  226.   }
  227.   

crypto/mem.c:226:1: return from a call to CRYPTO_zalloc
  224.           memset(ret, 0, num);
  225.       return ret;
  226. > }
  227.   
  228.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/rsa/rsa_mp.c:36:9: Taking false branch
34.       /* create a RSA_PRIME_INFO structure */
35.       pinfo = OPENSSL_zalloc(sizeof(RSA_PRIME_INFO));
36.       if (pinfo == NULL)
              ^
37.           return NULL;
38.       if ((pinfo->r = BN_secure_new()) == NULL)

crypto/rsa/rsa_mp.c:38:9: 
36.       if (pinfo == NULL)
37.           return NULL;
38. >     if ((pinfo->r = BN_secure_new()) == NULL)
39.           goto err;
40.       if ((pinfo->d = BN_secure_new()) == NULL)

crypto/bn/bn_lib.c:225:2: start of procedure BN_secure_new()
  223.   }
  224.   
  225.    BIGNUM *BN_secure_new(void)
          ^
  226.    {
  227.        BIGNUM *ret = BN_new();

crypto/bn/bn_lib.c:227:6: Skipping BN_new(): empty list of specs
  225.    BIGNUM *BN_secure_new(void)
  226.    {
  227.        BIGNUM *ret = BN_new();
              ^
  228.        if (ret != NULL)
  229.            ret->flags |= BN_FLG_SECURE;

crypto/bn/bn_lib.c:228:10: Taking true branch
  226.    {
  227.        BIGNUM *ret = BN_new();
  228.        if (ret != NULL)
                  ^
  229.            ret->flags |= BN_FLG_SECURE;
  230.        return ret;

crypto/bn/bn_lib.c:229:10: 
  227.        BIGNUM *ret = BN_new();
  228.        if (ret != NULL)
  229. >          ret->flags |= BN_FLG_SECURE;
  230.        return ret;
  231.    }

crypto/bn/bn_lib.c:230:6: 
  228.        if (ret != NULL)
  229.            ret->flags |= BN_FLG_SECURE;
  230. >      return ret;
  231.    }
  232.   

crypto/bn/bn_lib.c:231:2: return from a call to BN_secure_new
  229.            ret->flags |= BN_FLG_SECURE;
  230.        return ret;
  231.    }
          ^
  232.   
  233.   /* This is used by bn_expand2() */

crypto/rsa/rsa_mp.c:38:9: Taking false branch
36.       if (pinfo == NULL)
37.           return NULL;
38.       if ((pinfo->r = BN_secure_new()) == NULL)
              ^
39.           goto err;
40.       if ((pinfo->d = BN_secure_new()) == NULL)

crypto/rsa/rsa_mp.c:40:9: 
38.       if ((pinfo->r = BN_secure_new()) == NULL)
39.           goto err;
40. >     if ((pinfo->d = BN_secure_new()) == NULL)
41.           goto err;
42.       if ((pinfo->t = BN_secure_new()) == NULL)

crypto/bn/bn_lib.c:225:2: start of procedure BN_secure_new()
  223.   }
  224.   
  225.    BIGNUM *BN_secure_new(void)
          ^
  226.    {
  227.        BIGNUM *ret = BN_new();

crypto/bn/bn_lib.c:227:6: Skipping BN_new(): empty list of specs
  225.    BIGNUM *BN_secure_new(void)
  226.    {
  227.        BIGNUM *ret = BN_new();
              ^
  228.        if (ret != NULL)
  229.            ret->flags |= BN_FLG_SECURE;

crypto/bn/bn_lib.c:228:10: Taking true branch
  226.    {
  227.        BIGNUM *ret = BN_new();
  228.        if (ret != NULL)
                  ^
  229.            ret->flags |= BN_FLG_SECURE;
  230.        return ret;

crypto/bn/bn_lib.c:229:10: 
  227.        BIGNUM *ret = BN_new();
  228.        if (ret != NULL)
  229. >          ret->flags |= BN_FLG_SECURE;
  230.        return ret;
  231.    }

crypto/bn/bn_lib.c:230:6: 
  228.        if (ret != NULL)
  229.            ret->flags |= BN_FLG_SECURE;
  230. >      return ret;
  231.    }
  232.   

crypto/bn/bn_lib.c:231:2: return from a call to BN_secure_new
  229.            ret->flags |= BN_FLG_SECURE;
  230.        return ret;
  231.    }
          ^
  232.   
  233.   /* This is used by bn_expand2() */

crypto/rsa/rsa_mp.c:40:9: Taking false branch
38.       if ((pinfo->r = BN_secure_new()) == NULL)
39.           goto err;
40.       if ((pinfo->d = BN_secure_new()) == NULL)
              ^
41.           goto err;
42.       if ((pinfo->t = BN_secure_new()) == NULL)

crypto/rsa/rsa_mp.c:42:9: 
40.       if ((pinfo->d = BN_secure_new()) == NULL)
41.           goto err;
42. >     if ((pinfo->t = BN_secure_new()) == NULL)
43.           goto err;
44.       if ((pinfo->pp = BN_secure_new()) == NULL)

crypto/bn/bn_lib.c:225:2: start of procedure BN_secure_new()
  223.   }
  224.   
  225.    BIGNUM *BN_secure_new(void)
          ^
  226.    {
  227.        BIGNUM *ret = BN_new();

crypto/bn/bn_lib.c:227:6: Skipping BN_new(): empty list of specs
  225.    BIGNUM *BN_secure_new(void)
  226.    {
  227.        BIGNUM *ret = BN_new();
              ^
  228.        if (ret != NULL)
  229.            ret->flags |= BN_FLG_SECURE;

crypto/bn/bn_lib.c:228:10: Taking true branch
  226.    {
  227.        BIGNUM *ret = BN_new();
  228.        if (ret != NULL)
                  ^
  229.            ret->flags |= BN_FLG_SECURE;
  230.        return ret;

crypto/bn/bn_lib.c:229:10: 
  227.        BIGNUM *ret = BN_new();
  228.        if (ret != NULL)
  229. >          ret->flags |= BN_FLG_SECURE;
  230.        return ret;
  231.    }

crypto/bn/bn_lib.c:230:6: 
  228.        if (ret != NULL)
  229.            ret->flags |= BN_FLG_SECURE;
  230. >      return ret;
  231.    }
  232.   

crypto/bn/bn_lib.c:231:2: return from a call to BN_secure_new
  229.            ret->flags |= BN_FLG_SECURE;
  230.        return ret;
  231.    }
          ^
  232.   
  233.   /* This is used by bn_expand2() */

crypto/rsa/rsa_mp.c:42:9: Taking false branch
40.       if ((pinfo->d = BN_secure_new()) == NULL)
41.           goto err;
42.       if ((pinfo->t = BN_secure_new()) == NULL)
              ^
43.           goto err;
44.       if ((pinfo->pp = BN_secure_new()) == NULL)

crypto/rsa/rsa_mp.c:44:9: 
42.       if ((pinfo->t = BN_secure_new()) == NULL)
43.           goto err;
44. >     if ((pinfo->pp = BN_secure_new()) == NULL)
45.           goto err;
46.   

crypto/bn/bn_lib.c:225:2: start of procedure BN_secure_new()
  223.   }
  224.   
  225.    BIGNUM *BN_secure_new(void)
          ^
  226.    {
  227.        BIGNUM *ret = BN_new();

crypto/bn/bn_lib.c:227:6: Skipping BN_new(): empty list of specs
  225.    BIGNUM *BN_secure_new(void)
  226.    {
  227.        BIGNUM *ret = BN_new();
              ^
  228.        if (ret != NULL)
  229.            ret->flags |= BN_FLG_SECURE;

crypto/bn/bn_lib.c:228:10: Taking false branch
  226.    {
  227.        BIGNUM *ret = BN_new();
  228.        if (ret != NULL)
                  ^
  229.            ret->flags |= BN_FLG_SECURE;
  230.        return ret;

crypto/bn/bn_lib.c:230:6: 
  228.        if (ret != NULL)
  229.            ret->flags |= BN_FLG_SECURE;
  230. >      return ret;
  231.    }
  232.   

crypto/bn/bn_lib.c:231:2: return from a call to BN_secure_new
  229.            ret->flags |= BN_FLG_SECURE;
  230.        return ret;
  231.    }
          ^
  232.   
  233.   /* This is used by bn_expand2() */

crypto/rsa/rsa_mp.c:44:9: Taking true branch
42.       if ((pinfo->t = BN_secure_new()) == NULL)
43.           goto err;
44.       if ((pinfo->pp = BN_secure_new()) == NULL)
              ^
45.           goto err;
46.   

crypto/rsa/rsa_mp.c:49:2: 
47.       return pinfo;
48.   
49. >  err:
50.       BN_free(pinfo->r);
51.       BN_free(pinfo->d);

crypto/rsa/rsa_mp.c:50:5: Skipping BN_free(): empty list of specs
48.   
49.    err:
50.       BN_free(pinfo->r);
          ^
51.       BN_free(pinfo->d);
52.       BN_free(pinfo->t);

crypto/rsa/rsa_mp.c:51:5: Skipping BN_free(): empty list of specs
49.    err:
50.       BN_free(pinfo->r);
51.       BN_free(pinfo->d);
          ^
52.       BN_free(pinfo->t);
53.       BN_free(pinfo->pp);

crypto/rsa/rsa_mp.c:52:5: Skipping BN_free(): empty list of specs
50.       BN_free(pinfo->r);
51.       BN_free(pinfo->d);
52.       BN_free(pinfo->t);
          ^
53.       BN_free(pinfo->pp);
54.       return NULL;

crypto/rsa/rsa_mp.c:53:5: Skipping BN_free(): empty list of specs
51.       BN_free(pinfo->d);
52.       BN_free(pinfo->t);
53.       BN_free(pinfo->pp);
          ^
54.       return NULL;
55.   }
