ssl/statem/statem_clnt.c:2690: error: MEMORY_LEAK
  memory dynamically allocated by call to `EVP_MD_CTX_new()` at line 2632, column 12 is not reachable after line 2690, column 5.
Showing all 50 steps of the trace


ssl/statem/statem_clnt.c:2621:1: start of procedure tls_construct_client_verify()
2619.   }
2620.   
2621. > int tls_construct_client_verify(SSL *s)
2622.   {
2623.       unsigned char *p;

ssl/statem/statem_clnt.c:2625:5: 
2623.       unsigned char *p;
2624.       EVP_PKEY *pkey;
2625. >     const EVP_MD *md = s->s3->tmp.md[s->cert->key - s->cert->pkeys];
2626.       EVP_MD_CTX *mctx;
2627.       unsigned u = 0;

ssl/statem/statem_clnt.c:2627:5: 
2625.       const EVP_MD *md = s->s3->tmp.md[s->cert->key - s->cert->pkeys];
2626.       EVP_MD_CTX *mctx;
2627. >     unsigned u = 0;
2628.       unsigned long n = 0;
2629.       long hdatalen = 0;

ssl/statem/statem_clnt.c:2628:5: 
2626.       EVP_MD_CTX *mctx;
2627.       unsigned u = 0;
2628. >     unsigned long n = 0;
2629.       long hdatalen = 0;
2630.       void *hdata;

ssl/statem/statem_clnt.c:2629:5: 
2627.       unsigned u = 0;
2628.       unsigned long n = 0;
2629. >     long hdatalen = 0;
2630.       void *hdata;
2631.   

ssl/statem/statem_clnt.c:2632:5: 
2630.       void *hdata;
2631.   
2632. >     mctx = EVP_MD_CTX_new();
2633.       if (mctx == NULL) {
2634.           SSLerr(SSL_F_TLS_CONSTRUCT_CLIENT_VERIFY, ERR_R_MALLOC_FAILURE);

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)

ssl/statem/statem_clnt.c:2633:9: Taking false branch
2631.   
2632.       mctx = EVP_MD_CTX_new();
2633.       if (mctx == NULL) {
                ^
2634.           SSLerr(SSL_F_TLS_CONSTRUCT_CLIENT_VERIFY, ERR_R_MALLOC_FAILURE);
2635.           goto err;

ssl/statem/statem_clnt.c:2638:5: 
2636.       }
2637.   
2638. >     p = ssl_handshake_start(s);
2639.       pkey = s->cert->key->privatekey;
2640.   

ssl/statem/statem_clnt.c:2639:5: 
2637.   
2638.       p = ssl_handshake_start(s);
2639. >     pkey = s->cert->key->privatekey;
2640.   
2641.       hdatalen = BIO_get_mem_data(s->s3->handshake_buffer, &hdata);

ssl/statem/statem_clnt.c:2641:5: 
2639.       pkey = s->cert->key->privatekey;
2640.   
2641. >     hdatalen = BIO_get_mem_data(s->s3->handshake_buffer, &hdata);
2642.       if (hdatalen <= 0) {
2643.           SSLerr(SSL_F_TLS_CONSTRUCT_CLIENT_VERIFY, ERR_R_INTERNAL_ERROR);

crypto/bio/bio_lib.c:327:1: start of procedure BIO_ctrl()
  325.   }
  326.   
  327. > long BIO_ctrl(BIO *b, int cmd, long larg, void *parg)
  328.   {
  329.       long ret;

crypto/bio/bio_lib.c:332:9: Taking false branch
  330.       long (*cb) (BIO *, int, const char *, int, long, long);
  331.   
  332.       if (b == NULL)
                 ^
  333.           return (0);
  334.   

crypto/bio/bio_lib.c:335:10: Taking false branch
  333.           return (0);
  334.   
  335.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
                  ^
  336.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
  337.           return (-2);

crypto/bio/bio_lib.c:335:33: Taking true branch
  333.           return (0);
  334.   
  335.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
                                         ^
  336.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
  337.           return (-2);

crypto/bio/bio_lib.c:336:9: Skipping ERR_put_error(): empty list of specs
  334.   
  335.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
  336.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
                 ^
  337.           return (-2);
  338.       }

crypto/bio/bio_lib.c:337:9: 
  335.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
  336.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
  337. >         return (-2);
  338.       }
  339.   

crypto/bio/bio_lib.c:351:1: return from a call to BIO_ctrl
  349.           ret = cb(b, BIO_CB_CTRL | BIO_CB_RETURN, parg, cmd, larg, ret);
  350.       return (ret);
  351. > }
  352.   
  353.   long BIO_callback_ctrl(BIO *b, int cmd,

ssl/statem/statem_clnt.c:2642:9: Taking true branch
2640.   
2641.       hdatalen = BIO_get_mem_data(s->s3->handshake_buffer, &hdata);
2642.       if (hdatalen <= 0) {
                ^
2643.           SSLerr(SSL_F_TLS_CONSTRUCT_CLIENT_VERIFY, ERR_R_INTERNAL_ERROR);
2644.           goto err;

ssl/statem/statem_clnt.c:2643:9: Skipping ERR_put_error(): empty list of specs
2641.       hdatalen = BIO_get_mem_data(s->s3->handshake_buffer, &hdata);
2642.       if (hdatalen <= 0) {
2643.           SSLerr(SSL_F_TLS_CONSTRUCT_CLIENT_VERIFY, ERR_R_INTERNAL_ERROR);
                ^
2644.           goto err;
2645.       }

ssl/statem/statem_clnt.c:2689:2: 
2687.       EVP_MD_CTX_free(mctx);
2688.       return 1;
2689. >  err:
2690.       EVP_MD_CTX_free(mctx);
2691.       return 0;

ssl/statem/statem_clnt.c:2690:5: 
2688.       return 1;
2689.    err:
2690. >     EVP_MD_CTX_free(mctx);
2691.       return 0;
2692.   }

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)
