crypto/pem/pvkfmt.c:754: error: MEMORY_LEAK
  memory dynamically allocated to `return` by call to `EVP_CIPHER_CTX_new()` at line 749, column 28 is not reachable after line 754, column 9.
Showing all 28 steps of the trace


crypto/pem/pvkfmt.c:744:1: start of procedure i2b_PVK()
742.   }
743.   
744. > static int i2b_PVK(unsigned char **out, EVP_PKEY *pk, int enclevel,
745.                      pem_password_cb *cb, void *u)
746.   {

crypto/pem/pvkfmt.c:747:5: 
745.                      pem_password_cb *cb, void *u)
746.   {
747. >     int outlen = 24, pklen;
748.       unsigned char *p, *salt = NULL;
749.       EVP_CIPHER_CTX *cctx = EVP_CIPHER_CTX_new();

crypto/pem/pvkfmt.c:748:5: 
746.   {
747.       int outlen = 24, pklen;
748. >     unsigned char *p, *salt = NULL;
749.       EVP_CIPHER_CTX *cctx = EVP_CIPHER_CTX_new();
750.       if (enclevel)

crypto/pem/pvkfmt.c:749:5: 
747.       int outlen = 24, pklen;
748.       unsigned char *p, *salt = NULL;
749. >     EVP_CIPHER_CTX *cctx = EVP_CIPHER_CTX_new();
750.       if (enclevel)
751.           outlen += PVK_SALTLEN;

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/pem/pvkfmt.c:750:9: Taking true branch
748.       unsigned char *p, *salt = NULL;
749.       EVP_CIPHER_CTX *cctx = EVP_CIPHER_CTX_new();
750.       if (enclevel)
               ^
751.           outlen += PVK_SALTLEN;
752.       pklen = do_i2b(NULL, pk, 0);

crypto/pem/pvkfmt.c:751:9: 
749.       EVP_CIPHER_CTX *cctx = EVP_CIPHER_CTX_new();
750.       if (enclevel)
751. >         outlen += PVK_SALTLEN;
752.       pklen = do_i2b(NULL, pk, 0);
753.       if (pklen < 0)

crypto/pem/pvkfmt.c:752:5: Skipping do_i2b(): empty list of specs
750.       if (enclevel)
751.           outlen += PVK_SALTLEN;
752.       pklen = do_i2b(NULL, pk, 0);
           ^
753.       if (pklen < 0)
754.           return -1;

crypto/pem/pvkfmt.c:753:9: Taking true branch
751.           outlen += PVK_SALTLEN;
752.       pklen = do_i2b(NULL, pk, 0);
753.       if (pklen < 0)
               ^
754.           return -1;
755.       outlen += pklen;

crypto/pem/pvkfmt.c:754:9: 
752.       pklen = do_i2b(NULL, pk, 0);
753.       if (pklen < 0)
754. >         return -1;
755.       outlen += pklen;
756.       if (!out)
