crypto/ocsp/ocsp_vfy.c:402: error: MEMORY_LEAK
  memory dynamically allocated by call to `X509_STORE_CTX_new()` at line 337, column 27 is not reachable after line 402, column 5.
Showing all 45 steps of the trace


crypto/ocsp/ocsp_vfy.c:330:1: start of procedure OCSP_request_verify()
328.    */
329.   
330. > int OCSP_request_verify(OCSP_REQUEST *req, STACK_OF(X509) *certs,
331.                           X509_STORE *store, unsigned long flags)
332.   {

crypto/ocsp/ocsp_vfy.c:336:5: 
334.       X509_NAME *nm;
335.       GENERAL_NAME *gen;
336. >     int ret = 0;
337.       X509_STORE_CTX *ctx = X509_STORE_CTX_new();
338.   

crypto/ocsp/ocsp_vfy.c:337:5: 
335.       GENERAL_NAME *gen;
336.       int ret = 0;
337. >     X509_STORE_CTX *ctx = X509_STORE_CTX_new();
338.   
339.       if (ctx == NULL) {

crypto/x509/x509_vfy.c:2151:1: start of procedure X509_STORE_CTX_new()
  2149.   }
  2150.   
  2151. > X509_STORE_CTX *X509_STORE_CTX_new(void)
  2152.   {
  2153.       X509_STORE_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));

crypto/x509/x509_vfy.c:2153:5: 
  2151.   X509_STORE_CTX *X509_STORE_CTX_new(void)
  2152.   {
  2153. >     X509_STORE_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
  2154.   
  2155.       if (ctx == 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/x509/x509_vfy.c:2155:9: Taking false branch
  2153.       X509_STORE_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
  2154.   
  2155.       if (ctx == NULL) {
                  ^
  2156.           X509err(X509_F_X509_STORE_CTX_NEW, ERR_R_MALLOC_FAILURE);
  2157.           return NULL;

crypto/x509/x509_vfy.c:2159:5: 
  2157.           return NULL;
  2158.       }
  2159. >     return ctx;
  2160.   }
  2161.   

crypto/x509/x509_vfy.c:2160:1: return from a call to X509_STORE_CTX_new
  2158.       }
  2159.       return ctx;
  2160. > }
  2161.   
  2162.   void X509_STORE_CTX_free(X509_STORE_CTX *ctx)

crypto/ocsp/ocsp_vfy.c:339:9: Taking false branch
337.       X509_STORE_CTX *ctx = X509_STORE_CTX_new();
338.   
339.       if (ctx == NULL) {
               ^
340.           OCSPerr(OCSP_F_OCSP_REQUEST_VERIFY, ERR_R_MALLOC_FAILURE);
341.           goto err;

crypto/ocsp/ocsp_vfy.c:344:10: Taking false branch
342.       }
343.   
344.       if (!req->optionalSignature) {
                ^
345.           OCSPerr(OCSP_F_OCSP_REQUEST_VERIFY, OCSP_R_REQUEST_NOT_SIGNED);
346.           goto err;

crypto/ocsp/ocsp_vfy.c:348:5: 
346.           goto err;
347.       }
348. >     gen = req->tbsRequest.requestorName;
349.       if (!gen || gen->type != GEN_DIRNAME) {
350.           OCSPerr(OCSP_F_OCSP_REQUEST_VERIFY,

crypto/ocsp/ocsp_vfy.c:349:10: Taking false branch
347.       }
348.       gen = req->tbsRequest.requestorName;
349.       if (!gen || gen->type != GEN_DIRNAME) {
                ^
350.           OCSPerr(OCSP_F_OCSP_REQUEST_VERIFY,
351.                   OCSP_R_UNSUPPORTED_REQUESTORNAME_TYPE);

crypto/ocsp/ocsp_vfy.c:349:17: Taking true branch
347.       }
348.       gen = req->tbsRequest.requestorName;
349.       if (!gen || gen->type != GEN_DIRNAME) {
                       ^
350.           OCSPerr(OCSP_F_OCSP_REQUEST_VERIFY,
351.                   OCSP_R_UNSUPPORTED_REQUESTORNAME_TYPE);

crypto/ocsp/ocsp_vfy.c:350:9: Skipping ERR_put_error(): empty list of specs
348.       gen = req->tbsRequest.requestorName;
349.       if (!gen || gen->type != GEN_DIRNAME) {
350.           OCSPerr(OCSP_F_OCSP_REQUEST_VERIFY,
               ^
351.                   OCSP_R_UNSUPPORTED_REQUESTORNAME_TYPE);
352.           goto err;

crypto/ocsp/ocsp_vfy.c:399:1: 
397.       goto end;
398.   
399. > err:
400.       ret = 0;
401.   end:

crypto/ocsp/ocsp_vfy.c:400:5: 
398.   
399.   err:
400. >     ret = 0;
401.   end:
402.       X509_STORE_CTX_free(ctx);

crypto/ocsp/ocsp_vfy.c:401:1: 
399.   err:
400.       ret = 0;
401. > end:
402.       X509_STORE_CTX_free(ctx);
403.       return ret;

crypto/ocsp/ocsp_vfy.c:402:5: 
400.       ret = 0;
401.   end:
402. >     X509_STORE_CTX_free(ctx);
403.       return ret;
404.   

crypto/x509/x509_vfy.c:2162:1: start of procedure X509_STORE_CTX_free()
  2160.   }
  2161.   
  2162. > void X509_STORE_CTX_free(X509_STORE_CTX *ctx)
  2163.   {
  2164.       if (ctx == NULL)

crypto/x509/x509_vfy.c:2164:9: Taking false branch
  2162.   void X509_STORE_CTX_free(X509_STORE_CTX *ctx)
  2163.   {
  2164.       if (ctx == NULL)
                  ^
  2165.           return;
  2166.   

crypto/x509/x509_vfy.c:2167:5: Skipping X509_STORE_CTX_cleanup(): empty list of specs
  2165.           return;
  2166.   
  2167.       X509_STORE_CTX_cleanup(ctx);
              ^
  2168.       OPENSSL_free(ctx);
  2169.   }

crypto/x509/x509_vfy.c:2168:5: 
  2166.   
  2167.       X509_STORE_CTX_cleanup(ctx);
  2168. >     OPENSSL_free(ctx);
  2169.   }
  2170.   

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/x509/x509_vfy.c:2169:1: return from a call to X509_STORE_CTX_free
  2167.       X509_STORE_CTX_cleanup(ctx);
  2168.       OPENSSL_free(ctx);
  2169. > }
  2170.   
  2171.   int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509,
