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


crypto/pem/pvkfmt.c:773:1: start of procedure i2b_PVK()
771.   }
772.   
773. > static int i2b_PVK(unsigned char **out, EVP_PKEY *pk, int enclevel,
774.                      pem_password_cb *cb, void *u)
775.   {

crypto/pem/pvkfmt.c:776:5: 
774.                      pem_password_cb *cb, void *u)
775.   {
776. >     int outlen = 24, pklen;
777.       unsigned char *p, *salt = NULL;
778.       EVP_CIPHER_CTX *cctx = EVP_CIPHER_CTX_new();

crypto/pem/pvkfmt.c:777:5: 
775.   {
776.       int outlen = 24, pklen;
777. >     unsigned char *p, *salt = NULL;
778.       EVP_CIPHER_CTX *cctx = EVP_CIPHER_CTX_new();
779.       if (enclevel)

crypto/pem/pvkfmt.c:778:5: 
776.       int outlen = 24, pklen;
777.       unsigned char *p, *salt = NULL;
778. >     EVP_CIPHER_CTX *cctx = EVP_CIPHER_CTX_new();
779.       if (enclevel)
780.           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:157:1: start of procedure CRYPTO_zalloc()
    155.   }
    156.   
    157. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
    158.   {
    159.       void *ret = CRYPTO_malloc(num, file, line);

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

crypto/mem.c:120:1: start of procedure CRYPTO_malloc()
      118.   }
      119.   
      120. > void *CRYPTO_malloc(size_t num, const char *file, int line)
      121.   {
      122.       void *ret = NULL;

crypto/mem.c:122:5: 
      120.   void *CRYPTO_malloc(size_t num, const char *file, int line)
      121.   {
      122. >     void *ret = NULL;
      123.   
      124.       if (num <= 0)

crypto/mem.c:124:9: Taking false branch
      122.       void *ret = NULL;
      123.   
      124.       if (num <= 0)
                     ^
      125.           return NULL;
      126.   

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

crypto/mem.c:137:5: 
      135.       }
      136.   #else
      137. >     (void)file;
      138.       (void)line;
      139.       ret = malloc(num);

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

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

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

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

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

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

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

crypto/mem.c:164:1: return from a call to CRYPTO_zalloc
    162.           memset(ret, 0, num);
    163.       return ret;
    164. > }
    165.   
    166.   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:779:9: Taking true branch
777.       unsigned char *p, *salt = NULL;
778.       EVP_CIPHER_CTX *cctx = EVP_CIPHER_CTX_new();
779.       if (enclevel)
               ^
780.           outlen += PVK_SALTLEN;
781.       pklen = do_i2b(NULL, pk, 0);

crypto/pem/pvkfmt.c:780:9: 
778.       EVP_CIPHER_CTX *cctx = EVP_CIPHER_CTX_new();
779.       if (enclevel)
780. >         outlen += PVK_SALTLEN;
781.       pklen = do_i2b(NULL, pk, 0);
782.       if (pklen < 0)

crypto/pem/pvkfmt.c:781:5: Skipping do_i2b(): empty list of specs
779.       if (enclevel)
780.           outlen += PVK_SALTLEN;
781.       pklen = do_i2b(NULL, pk, 0);
           ^
782.       if (pklen < 0)
783.           return -1;

crypto/pem/pvkfmt.c:782:9: Taking true branch
780.           outlen += PVK_SALTLEN;
781.       pklen = do_i2b(NULL, pk, 0);
782.       if (pklen < 0)
               ^
783.           return -1;
784.       outlen += pklen;

crypto/pem/pvkfmt.c:783:9: 
781.       pklen = do_i2b(NULL, pk, 0);
782.       if (pklen < 0)
783. >         return -1;
784.       outlen += pklen;
785.       if (!out)
