crypto/ocsp/ocsp_ht.c:80: error: MEMORY_LEAK
  memory dynamically allocated by call to `CRYPTO_malloc()` at line 78, column 19 is not reachable after line 80, column 9.
Showing all 59 steps of the trace


crypto/ocsp/ocsp_ht.c:64:1: start of procedure OCSP_REQ_CTX_new()
62.   static int parse_http_line1(char *line);
63.   
64. > OCSP_REQ_CTX *OCSP_REQ_CTX_new(BIO *io, int maxline)
65.   {
66.       OCSP_REQ_CTX *rctx = OPENSSL_zalloc(sizeof(*rctx));

crypto/ocsp/ocsp_ht.c:66:5: 
64.   OCSP_REQ_CTX *OCSP_REQ_CTX_new(BIO *io, int maxline)
65.   {
66. >     OCSP_REQ_CTX *rctx = OPENSSL_zalloc(sizeof(*rctx));
67.   
68.       if (rctx == NULL)

crypto/mem.c:186:1: start of procedure CRYPTO_zalloc()
  184.   }
  185.   
  186. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
  187.   {
  188.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:188:5: 
  186.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
  187.   {
  188. >     void *ret = CRYPTO_malloc(num, file, line);
  189.   
  190.       FAILTEST();

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

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

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

crypto/mem.c:165:9: Taking false branch
    163.           return malloc_impl(num, file, line);
    164.   
    165.       if (num == 0)
                   ^
    166.           return NULL;
    167.   

crypto/mem.c:169:5: 
    167.   
    168.       FAILTEST();
    169. >     allow_customize = 0;
    170.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
    171.       if (call_malloc_debug) {

crypto/mem.c:179:5: 
    177.       }
    178.   #else
    179. >     osslargused(file); osslargused(line);
    180.       ret = malloc(num);
    181.   #endif

crypto/mem.c:179:24: 
    177.       }
    178.   #else
    179. >     osslargused(file); osslargused(line);
    180.       ret = malloc(num);
    181.   #endif

crypto/mem.c:180:5: 
    178.   #else
    179.       osslargused(file); osslargused(line);
    180. >     ret = malloc(num);
    181.   #endif
    182.   

crypto/mem.c:183:5: 
    181.   #endif
    182.   
    183. >     return ret;
    184.   }
    185.   

crypto/mem.c:184:1: return from a call to CRYPTO_malloc
    182.   
    183.       return ret;
    184. > }
    185.   
    186.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:191:9: Taking true branch
  189.   
  190.       FAILTEST();
  191.       if (ret != NULL)
                 ^
  192.           memset(ret, 0, num);
  193.       return ret;

crypto/mem.c:192:9: 
  190.       FAILTEST();
  191.       if (ret != NULL)
  192. >         memset(ret, 0, num);
  193.       return ret;
  194.   }

crypto/mem.c:193:5: 
  191.       if (ret != NULL)
  192.           memset(ret, 0, num);
  193. >     return ret;
  194.   }
  195.   

crypto/mem.c:194:1: return from a call to CRYPTO_zalloc
  192.           memset(ret, 0, num);
  193.       return ret;
  194. > }
  195.   
  196.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/ocsp/ocsp_ht.c:68:9: Taking false branch
66.       OCSP_REQ_CTX *rctx = OPENSSL_zalloc(sizeof(*rctx));
67.   
68.       if (rctx == NULL)
              ^
69.           return NULL;
70.       rctx->state = OHS_ERROR;

crypto/ocsp/ocsp_ht.c:70:5: 
68.       if (rctx == NULL)
69.           return NULL;
70. >     rctx->state = OHS_ERROR;
71.       rctx->max_resp_len = OCSP_MAX_RESP_LENGTH;
72.       rctx->mem = BIO_new(BIO_s_mem());

crypto/ocsp/ocsp_ht.c:71:5: 
69.           return NULL;
70.       rctx->state = OHS_ERROR;
71. >     rctx->max_resp_len = OCSP_MAX_RESP_LENGTH;
72.       rctx->mem = BIO_new(BIO_s_mem());
73.       rctx->io = io;

crypto/ocsp/ocsp_ht.c:72:5: 
70.       rctx->state = OHS_ERROR;
71.       rctx->max_resp_len = OCSP_MAX_RESP_LENGTH;
72. >     rctx->mem = BIO_new(BIO_s_mem());
73.       rctx->io = io;
74.       if (maxline > 0)

crypto/bio/bss_mem.c:71:1: start of procedure BIO_s_mem()
  69.    */
  70.   
  71. > const BIO_METHOD *BIO_s_mem(void)
  72.   {
  73.       return (&mem_method);

crypto/bio/bss_mem.c:73:5: 
  71.   const BIO_METHOD *BIO_s_mem(void)
  72.   {
  73. >     return (&mem_method);
  74.   }
  75.   

crypto/bio/bss_mem.c:74:1: return from a call to BIO_s_mem
  72.   {
  73.       return (&mem_method);
  74. > }
  75.   
  76.   const BIO_METHOD *BIO_s_secmem(void)

crypto/ocsp/ocsp_ht.c:72:5: Skipping BIO_new(): empty list of specs
70.       rctx->state = OHS_ERROR;
71.       rctx->max_resp_len = OCSP_MAX_RESP_LENGTH;
72.       rctx->mem = BIO_new(BIO_s_mem());
          ^
73.       rctx->io = io;
74.       if (maxline > 0)

crypto/ocsp/ocsp_ht.c:73:5: 
71.       rctx->max_resp_len = OCSP_MAX_RESP_LENGTH;
72.       rctx->mem = BIO_new(BIO_s_mem());
73. >     rctx->io = io;
74.       if (maxline > 0)
75.           rctx->iobuflen = maxline;

crypto/ocsp/ocsp_ht.c:74:9: Taking true branch
72.       rctx->mem = BIO_new(BIO_s_mem());
73.       rctx->io = io;
74.       if (maxline > 0)
              ^
75.           rctx->iobuflen = maxline;
76.       else

crypto/ocsp/ocsp_ht.c:75:9: 
73.       rctx->io = io;
74.       if (maxline > 0)
75. >         rctx->iobuflen = maxline;
76.       else
77.           rctx->iobuflen = OCSP_MAX_LINE_LEN;

crypto/ocsp/ocsp_ht.c:78:5: 
76.       else
77.           rctx->iobuflen = OCSP_MAX_LINE_LEN;
78. >     rctx->iobuf = OPENSSL_malloc(rctx->iobuflen);
79.       if (rctx->iobuf == NULL || rctx->mem == NULL) {
80.           OCSP_REQ_CTX_free(rctx);

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

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

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

crypto/mem.c:165:9: Taking false branch
  163.           return malloc_impl(num, file, line);
  164.   
  165.       if (num == 0)
                 ^
  166.           return NULL;
  167.   

crypto/mem.c:169:5: 
  167.   
  168.       FAILTEST();
  169. >     allow_customize = 0;
  170.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
  171.       if (call_malloc_debug) {

crypto/mem.c:179:5: 
  177.       }
  178.   #else
  179. >     osslargused(file); osslargused(line);
  180.       ret = malloc(num);
  181.   #endif

crypto/mem.c:179:24: 
  177.       }
  178.   #else
  179. >     osslargused(file); osslargused(line);
  180.       ret = malloc(num);
  181.   #endif

crypto/mem.c:180:5: 
  178.   #else
  179.       osslargused(file); osslargused(line);
  180. >     ret = malloc(num);
  181.   #endif
  182.   

crypto/mem.c:183:5: 
  181.   #endif
  182.   
  183. >     return ret;
  184.   }
  185.   

crypto/mem.c:184:1: return from a call to CRYPTO_malloc
  182.   
  183.       return ret;
  184. > }
  185.   
  186.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/ocsp/ocsp_ht.c:79:9: Taking false branch
77.           rctx->iobuflen = OCSP_MAX_LINE_LEN;
78.       rctx->iobuf = OPENSSL_malloc(rctx->iobuflen);
79.       if (rctx->iobuf == NULL || rctx->mem == NULL) {
              ^
80.           OCSP_REQ_CTX_free(rctx);
81.           return NULL;

crypto/ocsp/ocsp_ht.c:79:32: Taking true branch
77.           rctx->iobuflen = OCSP_MAX_LINE_LEN;
78.       rctx->iobuf = OPENSSL_malloc(rctx->iobuflen);
79.       if (rctx->iobuf == NULL || rctx->mem == NULL) {
                                     ^
80.           OCSP_REQ_CTX_free(rctx);
81.           return NULL;

crypto/ocsp/ocsp_ht.c:80:9: 
78.       rctx->iobuf = OPENSSL_malloc(rctx->iobuflen);
79.       if (rctx->iobuf == NULL || rctx->mem == NULL) {
80. >         OCSP_REQ_CTX_free(rctx);
81.           return NULL;
82.       }

crypto/ocsp/ocsp_ht.c:86:1: start of procedure OCSP_REQ_CTX_free()
  84.   }
  85.   
  86. > void OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx)
  87.   {
  88.       if (!rctx)

crypto/ocsp/ocsp_ht.c:88:10: Taking false branch
  86.   void OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx)
  87.   {
  88.       if (!rctx)
                 ^
  89.           return;
  90.       BIO_free(rctx->mem);

crypto/ocsp/ocsp_ht.c:90:5: Skipping BIO_free(): empty list of specs
  88.       if (!rctx)
  89.           return;
  90.       BIO_free(rctx->mem);
            ^
  91.       OPENSSL_free(rctx->iobuf);
  92.       OPENSSL_free(rctx);

crypto/ocsp/ocsp_ht.c:91:5: 
  89.           return;
  90.       BIO_free(rctx->mem);
  91. >     OPENSSL_free(rctx->iobuf);
  92.       OPENSSL_free(rctx);
  93.   }

crypto/mem.c:253:1: start of procedure CRYPTO_free()
    251.   }
    252.   
    253. > void CRYPTO_free(void *str, const char *file, int line)
    254.   {
    255.       if (free_impl != NULL && free_impl != &CRYPTO_free) {

crypto/mem.c:255:9: Taking true branch
    253.   void CRYPTO_free(void *str, const char *file, int line)
    254.   {
    255.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                   ^
    256.           free_impl(str, file, line);
    257.           return;

crypto/mem.c:255:30: Taking true branch
    253.   void CRYPTO_free(void *str, const char *file, int line)
    254.   {
    255.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                                        ^
    256.           free_impl(str, file, line);
    257.           return;

crypto/mem.c:256:9: Skipping __function_pointer__(): unresolved function pointer
    254.   {
    255.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
    256.           free_impl(str, file, line);
                   ^
    257.           return;
    258.       }

crypto/mem.c:257:9: 
    255.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
    256.           free_impl(str, file, line);
    257. >         return;
    258.       }
    259.   

crypto/mem.c:271:1: return from a call to CRYPTO_free
    269.       free(str);
    270.   #endif
    271. > }
    272.   
    273.   void CRYPTO_clear_free(void *str, size_t num, const char *file, int line)

crypto/ocsp/ocsp_ht.c:92:5: 
  90.       BIO_free(rctx->mem);
  91.       OPENSSL_free(rctx->iobuf);
  92. >     OPENSSL_free(rctx);
  93.   }
  94.   

crypto/mem.c:253:1: start of procedure CRYPTO_free()
    251.   }
    252.   
    253. > void CRYPTO_free(void *str, const char *file, int line)
    254.   {
    255.       if (free_impl != NULL && free_impl != &CRYPTO_free) {

crypto/mem.c:255:9: Taking false branch
    253.   void CRYPTO_free(void *str, const char *file, int line)
    254.   {
    255.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                   ^
    256.           free_impl(str, file, line);
    257.           return;

crypto/mem.c:269:5: 
    267.       }
    268.   #else
    269. >     free(str);
    270.   #endif
    271.   }

crypto/mem.c:271:1: return from a call to CRYPTO_free
    269.       free(str);
    270.   #endif
    271. > }
    272.   
    273.   void CRYPTO_clear_free(void *str, size_t num, const char *file, int line)

crypto/ocsp/ocsp_ht.c:93:1: return from a call to OCSP_REQ_CTX_free
  91.       OPENSSL_free(rctx->iobuf);
  92.       OPENSSL_free(rctx);
  93. > }
  94.   
  95.   BIO *OCSP_REQ_CTX_get0_mem_bio(OCSP_REQ_CTX *rctx)
