test/evp_extra_test.c:263: error: MEMORY_LEAK
  memory dynamically allocated by call to `EVP_MD_CTX_new()` at line 223, column 14 is not reachable after line 263, column 5.
Showing all 61 steps of the trace


test/evp_extra_test.c:215:1: start of procedure test_EVP_DigestSignInit()
213.   }
214.   
215. > static int test_EVP_DigestSignInit(void)
216.   {
217.       int ret = 0;

test/evp_extra_test.c:217:5: 
215.   static int test_EVP_DigestSignInit(void)
216.   {
217. >     int ret = 0;
218.       EVP_PKEY *pkey = NULL;
219.       unsigned char *sig = NULL;

test/evp_extra_test.c:218:5: 
216.   {
217.       int ret = 0;
218. >     EVP_PKEY *pkey = NULL;
219.       unsigned char *sig = NULL;
220.       size_t sig_len = 0;

test/evp_extra_test.c:219:5: 
217.       int ret = 0;
218.       EVP_PKEY *pkey = NULL;
219. >     unsigned char *sig = NULL;
220.       size_t sig_len = 0;
221.       EVP_MD_CTX *md_ctx, *md_ctx_verify;

test/evp_extra_test.c:220:5: 
218.       EVP_PKEY *pkey = NULL;
219.       unsigned char *sig = NULL;
220. >     size_t sig_len = 0;
221.       EVP_MD_CTX *md_ctx, *md_ctx_verify;
222.   

test/evp_extra_test.c:223:5: 
221.       EVP_MD_CTX *md_ctx, *md_ctx_verify;
222.   
223. >     md_ctx = EVP_MD_CTX_new();
224.       md_ctx_verify = EVP_MD_CTX_new();
225.       if (md_ctx == NULL || md_ctx_verify == NULL)

crypto/evp/digest.c:44:1: start of procedure EVP_MD_CTX_new()
  42.   }
  43.   
  44. > EVP_MD_CTX *EVP_MD_CTX_new(void)
  45.   {
  46.       return OPENSSL_zalloc(sizeof(EVP_MD_CTX));

crypto/evp/digest.c:46:5: 
  44.   EVP_MD_CTX *EVP_MD_CTX_new(void)
  45.   {
  46. >     return OPENSSL_zalloc(sizeof(EVP_MD_CTX));
  47.   }
  48.   

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/digest.c:47:1: return from a call to EVP_MD_CTX_new
  45.   {
  46.       return OPENSSL_zalloc(sizeof(EVP_MD_CTX));
  47. > }
  48.   
  49.   void EVP_MD_CTX_free(EVP_MD_CTX *ctx)

test/evp_extra_test.c:224:5: 
222.   
223.       md_ctx = EVP_MD_CTX_new();
224. >     md_ctx_verify = EVP_MD_CTX_new();
225.       if (md_ctx == NULL || md_ctx_verify == NULL)
226.           goto out;

crypto/evp/digest.c:44:1: start of procedure EVP_MD_CTX_new()
  42.   }
  43.   
  44. > EVP_MD_CTX *EVP_MD_CTX_new(void)
  45.   {
  46.       return OPENSSL_zalloc(sizeof(EVP_MD_CTX));

crypto/evp/digest.c:46:5: 
  44.   EVP_MD_CTX *EVP_MD_CTX_new(void)
  45.   {
  46. >     return OPENSSL_zalloc(sizeof(EVP_MD_CTX));
  47.   }
  48.   

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 true 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:75:32: Taking true 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:76:9: Skipping __function_pointer__(): unresolved function pointer
      74.   
      75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
      76.           return malloc_impl(num, file, line);
                    ^
      77.   
      78.       if (num <= 0)

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 false 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: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/digest.c:47:1: return from a call to EVP_MD_CTX_new
  45.   {
  46.       return OPENSSL_zalloc(sizeof(EVP_MD_CTX));
  47. > }
  48.   
  49.   void EVP_MD_CTX_free(EVP_MD_CTX *ctx)

test/evp_extra_test.c:225:9: Taking false branch
223.       md_ctx = EVP_MD_CTX_new();
224.       md_ctx_verify = EVP_MD_CTX_new();
225.       if (md_ctx == NULL || md_ctx_verify == NULL)
               ^
226.           goto out;
227.   

test/evp_extra_test.c:225:27: Taking true branch
223.       md_ctx = EVP_MD_CTX_new();
224.       md_ctx_verify = EVP_MD_CTX_new();
225.       if (md_ctx == NULL || md_ctx_verify == NULL)
                                 ^
226.           goto out;
227.   

test/evp_extra_test.c:258:2: 
256.       ret = 1;
257.   
258. >  out:
259.       if (!ret) {
260.           ERR_print_errors_fp(stderr);

test/evp_extra_test.c:259:10: Taking true branch
257.   
258.    out:
259.       if (!ret) {
                ^
260.           ERR_print_errors_fp(stderr);
261.       }

test/evp_extra_test.c:260:9: 
258.    out:
259.       if (!ret) {
260. >         ERR_print_errors_fp(stderr);
261.       }
262.   

crypto/err/err_prn.c:57:1: start of procedure ERR_print_errors_fp()
  55.   
  56.   #ifndef OPENSSL_NO_STDIO
  57. > void ERR_print_errors_fp(FILE *fp)
  58.   {
  59.       BIO *bio = BIO_new_fp(fp, BIO_NOCLOSE);

crypto/err/err_prn.c:59:5: Skipping BIO_new_fp(): empty list of specs
  57.   void ERR_print_errors_fp(FILE *fp)
  58.   {
  59.       BIO *bio = BIO_new_fp(fp, BIO_NOCLOSE);
            ^
  60.       if (bio == NULL)
  61.           return;

crypto/err/err_prn.c:60:9: Taking true branch
  58.   {
  59.       BIO *bio = BIO_new_fp(fp, BIO_NOCLOSE);
  60.       if (bio == NULL)
                ^
  61.           return;
  62.   

crypto/err/err_prn.c:61:9: 
  59.       BIO *bio = BIO_new_fp(fp, BIO_NOCLOSE);
  60.       if (bio == NULL)
  61. >         return;
  62.   
  63.       ERR_print_errors_cb(print_bio, bio);

crypto/err/err_prn.c:65:1: return from a call to ERR_print_errors_fp
  63.       ERR_print_errors_cb(print_bio, bio);
  64.       BIO_free(bio);
  65. > }
  66.   #endif

test/evp_extra_test.c:263:5: 
261.       }
262.   
263. >     EVP_MD_CTX_free(md_ctx);
264.       EVP_MD_CTX_free(md_ctx_verify);
265.       EVP_PKEY_free(pkey);

crypto/evp/digest.c:49:1: start of procedure EVP_MD_CTX_free()
  47.   }
  48.   
  49. > void EVP_MD_CTX_free(EVP_MD_CTX *ctx)
  50.   {
  51.       EVP_MD_CTX_reset(ctx);

crypto/evp/digest.c:51:5: Skipping EVP_MD_CTX_reset(): empty list of specs
  49.   void EVP_MD_CTX_free(EVP_MD_CTX *ctx)
  50.   {
  51.       EVP_MD_CTX_reset(ctx);
            ^
  52.       OPENSSL_free(ctx);
  53.   }

crypto/evp/digest.c:52:5: 
  50.   {
  51.       EVP_MD_CTX_reset(ctx);
  52. >     OPENSSL_free(ctx);
  53.   }
  54.   

crypto/mem.c:163:1: start of procedure CRYPTO_free()
    161.   }
    162.   
    163. > void CRYPTO_free(void *str, const char *file, int line)
    164.   {
    165.       if (free_impl != NULL && free_impl != &CRYPTO_free) {

crypto/mem.c:165:9: Taking true branch
    163.   void CRYPTO_free(void *str, const char *file, int line)
    164.   {
    165.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                   ^
    166.           free_impl(str, file, line);
    167.           return;

crypto/mem.c:165:30: Taking true branch
    163.   void CRYPTO_free(void *str, const char *file, int line)
    164.   {
    165.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                                        ^
    166.           free_impl(str, file, line);
    167.           return;

crypto/mem.c:166:9: Skipping __function_pointer__(): unresolved function pointer
    164.   {
    165.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
    166.           free_impl(str, file, line);
                   ^
    167.           return;
    168.       }

crypto/mem.c:167:9: 
    165.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
    166.           free_impl(str, file, line);
    167. >         return;
    168.       }
    169.   

crypto/mem.c:181:1: return from a call to CRYPTO_free
    179.       free(str);
    180.   #endif
    181. > }
    182.   
    183.   void CRYPTO_clear_free(void *str, size_t num, const char *file, int line)

crypto/evp/digest.c:53:1: return from a call to EVP_MD_CTX_free
  51.       EVP_MD_CTX_reset(ctx);
  52.       OPENSSL_free(ctx);
  53. > }
  54.   
  55.   int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type)
