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


crypto/pkcs12/p12_decr.c:73:1: start of procedure PKCS12_pbe_crypt()
71.    */
72.   
73. > unsigned char *PKCS12_pbe_crypt(X509_ALGOR *algor, const char *pass,
74.                                   int passlen, unsigned char *in, int inlen,
75.                                   unsigned char **data, int *datalen, int en_de)

crypto/pkcs12/p12_decr.c:77:5: 
75.                                   unsigned char **data, int *datalen, int en_de)
76.   {
77. >     unsigned char *out = NULL;
78.       int outlen, i;
79.       EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();

crypto/pkcs12/p12_decr.c:79:5: 
77.       unsigned char *out = NULL;
78.       int outlen, i;
79. >     EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
80.   
81.       if (ctx == NULL) {

crypto/evp/evp_enc.c:93:1: start of procedure EVP_CIPHER_CTX_new()
  91.   }
  92.   
  93. > EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void)
  94.   {
  95.       return OPENSSL_zalloc(sizeof(EVP_CIPHER_CTX));

crypto/evp/evp_enc.c:95:5: 
  93.   EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void)
  94.   {
  95. >     return OPENSSL_zalloc(sizeof(EVP_CIPHER_CTX));
  96.   }
  97.   

crypto/mem.c:158:1: start of procedure CRYPTO_zalloc()
    156.   }
    157.   
    158. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
    159.   {
    160.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:160:5: 
    158.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
    159.   {
    160. >     void *ret = CRYPTO_malloc(num, file, line);
    161.   
    162.       if (ret != NULL)

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 (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:123:9: Taking false branch
      121.       void *ret = NULL;
      122.   
      123.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                     ^
      124.           return malloc_impl(num, file, line);
      125.   

crypto/mem.c:126:9: Taking false branch
      124.           return malloc_impl(num, file, line);
      125.   
      126.       if (num <= 0)
                     ^
      127.           return NULL;
      128.   

crypto/mem.c:129:5: 
      127.           return NULL;
      128.   
      129. >     allow_customize = 0;
      130.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
      131.       if (call_malloc_debug) {

crypto/mem.c:139:5: 
      137.       }
      138.   #else
      139. >     osslargused(file); osslargused(line);
      140.       ret = malloc(num);
      141.   #endif

crypto/mem.c:139:24: 
      137.       }
      138.   #else
      139. >     osslargused(file); osslargused(line);
      140.       ret = malloc(num);
      141.   #endif

crypto/mem.c:140:5: 
      138.   #else
      139.       osslargused(file); osslargused(line);
      140. >     ret = malloc(num);
      141.   #endif
      142.   

crypto/mem.c:155:5: 
      153.   #endif
      154.   
      155. >     return ret;
      156.   }
      157.   

crypto/mem.c:156:1: return from a call to CRYPTO_malloc
      154.   
      155.       return ret;
      156. > }
      157.   
      158.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:162:9: Taking true branch
    160.       void *ret = CRYPTO_malloc(num, file, line);
    161.   
    162.       if (ret != NULL)
                   ^
    163.           memset(ret, 0, num);
    164.       return ret;

crypto/mem.c:163:9: 
    161.   
    162.       if (ret != NULL)
    163. >         memset(ret, 0, num);
    164.       return ret;
    165.   }

crypto/mem.c:164:5: 
    162.       if (ret != NULL)
    163.           memset(ret, 0, num);
    164. >     return ret;
    165.   }
    166.   

crypto/mem.c:165:1: return from a call to CRYPTO_zalloc
    163.           memset(ret, 0, num);
    164.       return ret;
    165. > }
    166.   
    167.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/evp/evp_enc.c:96:1: return from a call to EVP_CIPHER_CTX_new
  94.   {
  95.       return OPENSSL_zalloc(sizeof(EVP_CIPHER_CTX));
  96. > }
  97.   
  98.   void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)

crypto/pkcs12/p12_decr.c:81:9: Taking false branch
79.       EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
80.   
81.       if (ctx == NULL) {
              ^
82.           PKCS12err(PKCS12_F_PKCS12_PBE_CRYPT, ERR_R_MALLOC_FAILURE);
83.           goto err;

crypto/pkcs12/p12_decr.c:87:10: Taking true branch
85.   
86.       /* Decrypt data */
87.       if (!EVP_PBE_CipherInit(algor->algorithm, pass, passlen,
               ^
88.                               algor->parameter, ctx, en_de)) {
89.           PKCS12err(PKCS12_F_PKCS12_PBE_CRYPT,

crypto/pkcs12/p12_decr.c:89:9: Skipping ERR_put_error(): empty list of specs
87.       if (!EVP_PBE_CipherInit(algor->algorithm, pass, passlen,
88.                               algor->parameter, ctx, en_de)) {
89.           PKCS12err(PKCS12_F_PKCS12_PBE_CRYPT,
              ^
90.                     PKCS12_R_PKCS12_ALGOR_CIPHERINIT_ERROR);
91.           goto err;

crypto/pkcs12/p12_decr.c:120:2: 
118.       if (data)
119.           *data = out;
120. >  err:
121.       EVP_CIPHER_CTX_free(ctx);
122.       return out;

crypto/pkcs12/p12_decr.c:121:5: 
119.           *data = out;
120.    err:
121. >     EVP_CIPHER_CTX_free(ctx);
122.       return out;
123.   

crypto/evp/evp_enc.c:98:1: start of procedure EVP_CIPHER_CTX_free()
  96.   }
  97.   
  98. > void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)
  99.   {
  100.       EVP_CIPHER_CTX_reset(ctx);

crypto/evp/evp_enc.c:100:5: Skipping EVP_CIPHER_CTX_reset(): empty list of specs
  98.   void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)
  99.   {
  100.       EVP_CIPHER_CTX_reset(ctx);
             ^
  101.       OPENSSL_free(ctx);
  102.   }

crypto/evp/evp_enc.c:101:5: 
  99.   {
  100.       EVP_CIPHER_CTX_reset(ctx);
  101. >     OPENSSL_free(ctx);
  102.   }
  103.   

crypto/mem.c:222:1: start of procedure CRYPTO_free()
    220.   }
    221.   
    222. > void CRYPTO_free(void *str, const char *file, int line)
    223.   {
    224.       if (free_impl != NULL && free_impl != &CRYPTO_free) {

crypto/mem.c:224:9: Taking true branch
    222.   void CRYPTO_free(void *str, const char *file, int line)
    223.   {
    224.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                   ^
    225.           free_impl(str, file, line);
    226.           return;

crypto/mem.c:224:30: Taking true branch
    222.   void CRYPTO_free(void *str, const char *file, int line)
    223.   {
    224.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                                        ^
    225.           free_impl(str, file, line);
    226.           return;

crypto/mem.c:225:9: Skipping __function_pointer__(): unresolved function pointer
    223.   {
    224.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
    225.           free_impl(str, file, line);
                   ^
    226.           return;
    227.       }

crypto/mem.c:226:9: 
    224.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
    225.           free_impl(str, file, line);
    226. >         return;
    227.       }
    228.   

crypto/mem.c:240:1: return from a call to CRYPTO_free
    238.       free(str);
    239.   #endif
    240. > }
    241.   
    242.   void CRYPTO_clear_free(void *str, size_t num, const char *file, int line)

crypto/evp/evp_enc.c:102:1: return from a call to EVP_CIPHER_CTX_free
  100.       EVP_CIPHER_CTX_reset(ctx);
  101.       OPENSSL_free(ctx);
  102. > }
  103.   
  104.   int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
