crypto/pkcs12/p12_decr.c:72: error: MEMORY_LEAK
  memory dynamically allocated by call to `EVP_CIPHER_CTX_new()` at line 30, column 27 is not reachable after line 72, column 5.
Showing all 27 steps of the trace


crypto/pkcs12/p12_decr.c:24:1: start of procedure PKCS12_pbe_crypt()
22.    */
23.   
24. > unsigned char *PKCS12_pbe_crypt(X509_ALGOR *algor, const char *pass,
25.                                   int passlen, unsigned char *in, int inlen,
26.                                   unsigned char **data, int *datalen, int en_de)

crypto/pkcs12/p12_decr.c:28:5: 
26.                                   unsigned char **data, int *datalen, int en_de)
27.   {
28. >     unsigned char *out = NULL;
29.       int outlen, i;
30.       EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();

crypto/pkcs12/p12_decr.c:30:5: 
28.       unsigned char *out = NULL;
29.       int outlen, i;
30. >     EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
31.   
32.       if (ctx == NULL) {

crypto/evp/evp_enc.c:38:1: start of procedure EVP_CIPHER_CTX_new()
  36.   }
  37.   
  38. > EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void)
  39.   {
  40.       return OPENSSL_zalloc(sizeof(EVP_CIPHER_CTX));

crypto/evp/evp_enc.c:40:5: 
  38.   EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void)
  39.   {
  40. >     return OPENSSL_zalloc(sizeof(EVP_CIPHER_CTX));
  41.   }
  42.   

crypto/mem.c:98:1: start of procedure CRYPTO_zalloc()
    96.   }
    97.   
    98. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
    99.   {
    100.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:100:5: 
    98.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
    99.   {
    100. >     void *ret = CRYPTO_malloc(num, file, line);
    101.   
    102.       if (ret != NULL)

crypto/mem.c:71:1: start of procedure CRYPTO_malloc()
      69.   }
      70.   
      71. > void *CRYPTO_malloc(size_t num, const char *file, int line)
      72.   {
      73.       void *ret = NULL;

crypto/mem.c:73:5: 
      71.   void *CRYPTO_malloc(size_t num, const char *file, int line)
      72.   {
      73. >     void *ret = NULL;
      74.   
      75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:75:9: Taking false branch
      73.       void *ret = NULL;
      74.   
      75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                    ^
      76.           return malloc_impl(num, file, line);
      77.   

crypto/mem.c:78:9: Taking false branch
      76.           return malloc_impl(num, file, line);
      77.   
      78.       if (num <= 0)
                    ^
      79.           return NULL;
      80.   

crypto/mem.c:81:5: 
      79.           return NULL;
      80.   
      81. >     allow_customize = 0;
      82.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
      83.       if (call_malloc_debug) {

crypto/mem.c:91:5: 
      89.       }
      90.   #else
      91. >     osslargused(file); osslargused(line);
      92.       ret = malloc(num);
      93.   #endif

crypto/mem.c:91:24: 
      89.       }
      90.   #else
      91. >     osslargused(file); osslargused(line);
      92.       ret = malloc(num);
      93.   #endif

crypto/mem.c:92:5: 
      90.   #else
      91.       osslargused(file); osslargused(line);
      92. >     ret = malloc(num);
      93.   #endif
      94.   

crypto/mem.c:95:5: 
      93.   #endif
      94.   
      95. >     return ret;
      96.   }
      97.   

crypto/mem.c:96:1: return from a call to CRYPTO_malloc
      94.   
      95.       return ret;
      96. > }
      97.   
      98.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:102:9: Taking true branch
    100.       void *ret = CRYPTO_malloc(num, file, line);
    101.   
    102.       if (ret != NULL)
                   ^
    103.           memset(ret, 0, num);
    104.       return ret;

crypto/mem.c:103:9: 
    101.   
    102.       if (ret != NULL)
    103. >         memset(ret, 0, num);
    104.       return ret;
    105.   }

crypto/mem.c:104:5: 
    102.       if (ret != NULL)
    103.           memset(ret, 0, num);
    104. >     return ret;
    105.   }
    106.   

crypto/mem.c:105:1: return from a call to CRYPTO_zalloc
    103.           memset(ret, 0, num);
    104.       return ret;
    105. > }
    106.   
    107.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/evp/evp_enc.c:41:1: return from a call to EVP_CIPHER_CTX_new
  39.   {
  40.       return OPENSSL_zalloc(sizeof(EVP_CIPHER_CTX));
  41. > }
  42.   
  43.   void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)

crypto/pkcs12/p12_decr.c:32:9: Taking false branch
30.       EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
31.   
32.       if (ctx == NULL) {
              ^
33.           PKCS12err(PKCS12_F_PKCS12_PBE_CRYPT, ERR_R_MALLOC_FAILURE);
34.           goto err;

crypto/pkcs12/p12_decr.c:38:10: Taking true branch
36.   
37.       /* Decrypt data */
38.       if (!EVP_PBE_CipherInit(algor->algorithm, pass, passlen,
               ^
39.                               algor->parameter, ctx, en_de)) {
40.           PKCS12err(PKCS12_F_PKCS12_PBE_CRYPT,

crypto/pkcs12/p12_decr.c:40:9: Skipping ERR_put_error(): empty list of specs
38.       if (!EVP_PBE_CipherInit(algor->algorithm, pass, passlen,
39.                               algor->parameter, ctx, en_de)) {
40.           PKCS12err(PKCS12_F_PKCS12_PBE_CRYPT,
              ^
41.                     PKCS12_R_PKCS12_ALGOR_CIPHERINIT_ERROR);
42.           goto err;

crypto/pkcs12/p12_decr.c:71:2: 
69.       if (data)
70.           *data = out;
71. >  err:
72.       EVP_CIPHER_CTX_free(ctx);
73.       return out;

crypto/pkcs12/p12_decr.c:72:5: Skipping EVP_CIPHER_CTX_free(): empty list of specs
70.           *data = out;
71.    err:
72.       EVP_CIPHER_CTX_free(ctx);
          ^
73.       return out;
74.   
