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:218:1: start of procedure CRYPTO_zalloc()
  216.   }
  217.   
  218. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
  219.   {
  220.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:220:5: 
  218.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
  219.   {
  220. >     void *ret = CRYPTO_malloc(num, file, line);
  221.   
  222.       FAILTEST();

crypto/mem.c:189:1: start of procedure CRYPTO_malloc()
    187.   #endif
    188.   
    189. > void *CRYPTO_malloc(size_t num, const char *file, int line)
    190.   {
    191.       void *ret = NULL;

crypto/mem.c:191:5: 
    189.   void *CRYPTO_malloc(size_t num, const char *file, int line)
    190.   {
    191. >     void *ret = NULL;
    192.   
    193.       INCREMENT(malloc_count);

crypto/mem.c:194:9: Taking false branch
    192.   
    193.       INCREMENT(malloc_count);
    194.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                   ^
    195.           return malloc_impl(num, file, line);
    196.   

crypto/mem.c:197:9: Taking false branch
    195.           return malloc_impl(num, file, line);
    196.   
    197.       if (num == 0)
                   ^
    198.           return NULL;
    199.   

crypto/mem.c:201:5: 
    199.   
    200.       FAILTEST();
    201. >     allow_customize = 0;
    202.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
    203.       if (call_malloc_debug) {

crypto/mem.c:211:5: 
    209.       }
    210.   #else
    211. >     (void)(file); (void)(line);
    212.       ret = malloc(num);
    213.   #endif

crypto/mem.c:211:19: 
    209.       }
    210.   #else
    211. >     (void)(file); (void)(line);
    212.       ret = malloc(num);
    213.   #endif

crypto/mem.c:212:5: 
    210.   #else
    211.       (void)(file); (void)(line);
    212. >     ret = malloc(num);
    213.   #endif
    214.   

crypto/mem.c:215:5: 
    213.   #endif
    214.   
    215. >     return ret;
    216.   }
    217.   

crypto/mem.c:216:1: return from a call to CRYPTO_malloc
    214.   
    215.       return ret;
    216. > }
    217.   
    218.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:223:9: Taking true branch
  221.   
  222.       FAILTEST();
  223.       if (ret != NULL)
                 ^
  224.           memset(ret, 0, num);
  225.       return ret;

crypto/mem.c:224:9: 
  222.       FAILTEST();
  223.       if (ret != NULL)
  224. >         memset(ret, 0, num);
  225.       return ret;
  226.   }

crypto/mem.c:225:5: 
  223.       if (ret != NULL)
  224.           memset(ret, 0, num);
  225. >     return ret;
  226.   }
  227.   

crypto/mem.c:226:1: return from a call to CRYPTO_zalloc
  224.           memset(ret, 0, num);
  225.       return ret;
  226. > }
  227.   
  228.   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:189:1: start of procedure CRYPTO_malloc()
  187.   #endif
  188.   
  189. > void *CRYPTO_malloc(size_t num, const char *file, int line)
  190.   {
  191.       void *ret = NULL;

crypto/mem.c:191:5: 
  189.   void *CRYPTO_malloc(size_t num, const char *file, int line)
  190.   {
  191. >     void *ret = NULL;
  192.   
  193.       INCREMENT(malloc_count);

crypto/mem.c:194:9: Taking false branch
  192.   
  193.       INCREMENT(malloc_count);
  194.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                 ^
  195.           return malloc_impl(num, file, line);
  196.   

crypto/mem.c:197:9: Taking false branch
  195.           return malloc_impl(num, file, line);
  196.   
  197.       if (num == 0)
                 ^
  198.           return NULL;
  199.   

crypto/mem.c:201:5: 
  199.   
  200.       FAILTEST();
  201. >     allow_customize = 0;
  202.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
  203.       if (call_malloc_debug) {

crypto/mem.c:211:5: 
  209.       }
  210.   #else
  211. >     (void)(file); (void)(line);
  212.       ret = malloc(num);
  213.   #endif

crypto/mem.c:211:19: 
  209.       }
  210.   #else
  211. >     (void)(file); (void)(line);
  212.       ret = malloc(num);
  213.   #endif

crypto/mem.c:212:5: 
  210.   #else
  211.       (void)(file); (void)(line);
  212. >     ret = malloc(num);
  213.   #endif
  214.   

crypto/mem.c:215:5: 
  213.   #endif
  214.   
  215. >     return ret;
  216.   }
  217.   

crypto/mem.c:216:1: return from a call to CRYPTO_malloc
  214.   
  215.       return ret;
  216. > }
  217.   
  218.   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:286:1: start of procedure CRYPTO_free()
    284.   }
    285.   
    286. > void CRYPTO_free(void *str, const char *file, int line)
    287.   {
    288.       INCREMENT(free_count);

crypto/mem.c:289:9: Taking true branch
    287.   {
    288.       INCREMENT(free_count);
    289.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                   ^
    290.           free_impl(str, file, line);
    291.           return;

crypto/mem.c:289:30: Taking true branch
    287.   {
    288.       INCREMENT(free_count);
    289.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                                        ^
    290.           free_impl(str, file, line);
    291.           return;

crypto/mem.c:290:9: Skipping __function_pointer__(): unresolved function pointer
    288.       INCREMENT(free_count);
    289.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
    290.           free_impl(str, file, line);
                   ^
    291.           return;
    292.       }

crypto/mem.c:291:9: 
    289.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
    290.           free_impl(str, file, line);
    291. >         return;
    292.       }
    293.   

crypto/mem.c:305:1: return from a call to CRYPTO_free
    303.       free(str);
    304.   #endif
    305. > }
    306.   
    307.   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:286:1: start of procedure CRYPTO_free()
    284.   }
    285.   
    286. > void CRYPTO_free(void *str, const char *file, int line)
    287.   {
    288.       INCREMENT(free_count);

crypto/mem.c:289:9: Taking false branch
    287.   {
    288.       INCREMENT(free_count);
    289.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                   ^
    290.           free_impl(str, file, line);
    291.           return;

crypto/mem.c:303:5: 
    301.       }
    302.   #else
    303. >     free(str);
    304.   #endif
    305.   }

crypto/mem.c:305:1: return from a call to CRYPTO_free
    303.       free(str);
    304.   #endif
    305. > }
    306.   
    307.   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)
