crypto/ec/curve448/eddsa.c:278: error: MEMORY_LEAK
  memory dynamically allocated by call to `EVP_MD_CTX_new()` at line 268, column 31 is not reachable after line 278, column 13.
Showing all 45 steps of the trace


crypto/ec/curve448/eddsa.c:244:1: start of procedure c448_ed448_verify()
242.   }
243.   
244. > c448_error_t c448_ed448_verify(
245.                       const uint8_t signature[EDDSA_448_SIGNATURE_BYTES],
246.                       const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES],

crypto/ec/curve448/eddsa.c:252:5: Skipping curve448_point_decode_like_eddsa_and_mul_by_ratio(): empty list of specs
250.   {
251.       curve448_point_t pk_point, r_point;
252.       c448_error_t error =
           ^
253.           curve448_point_decode_like_eddsa_and_mul_by_ratio(pk_point, pubkey);
254.       curve448_scalar_t challenge_scalar;

crypto/ec/curve448/eddsa.c:258:9: Taking false branch
256.       unsigned int c;
257.   
258.       if (C448_SUCCESS != error)
               ^
259.           return error;
260.   

crypto/ec/curve448/eddsa.c:261:5: Skipping curve448_point_decode_like_eddsa_and_mul_by_ratio(): empty list of specs
259.           return error;
260.   
261.       error =
           ^
262.           curve448_point_decode_like_eddsa_and_mul_by_ratio(r_point, signature);
263.       if (C448_SUCCESS != error)

crypto/ec/curve448/eddsa.c:263:9: Taking false branch
261.       error =
262.           curve448_point_decode_like_eddsa_and_mul_by_ratio(r_point, signature);
263.       if (C448_SUCCESS != error)
               ^
264.           return error;
265.   

crypto/ec/curve448/eddsa.c:268:9: 
266.       {
267.           /* Compute the challenge */
268. >         EVP_MD_CTX *hashctx = EVP_MD_CTX_new();
269.           uint8_t challenge[2 * EDDSA_448_PRIVATE_BYTES];
270.   

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:228:1: start of procedure CRYPTO_zalloc()
    226.   }
    227.   
    228. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
    229.   {
    230.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:230:5: 
    228.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
    229.   {
    230. >     void *ret = CRYPTO_malloc(num, file, line);
    231.   
    232.       FAILTEST();

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

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

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

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

crypto/mem.c:204:9: Taking true branch
      202.   
      203.       FAILTEST();
      204.       if (allow_customize) {
                     ^
      205.           /*
      206.            * Disallow customization after the first allocation. We only set this

crypto/mem.c:210:9: 
      208.            * allocation.
      209.            */
      210. >         allow_customize = 0;
      211.       }
      212.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG

crypto/mem.c:221:5: 
      219.       }
      220.   #else
      221. >     (void)(file); (void)(line);
      222.       ret = malloc(num);
      223.   #endif

crypto/mem.c:221:19: 
      219.       }
      220.   #else
      221. >     (void)(file); (void)(line);
      222.       ret = malloc(num);
      223.   #endif

crypto/mem.c:222:5: 
      220.   #else
      221.       (void)(file); (void)(line);
      222. >     ret = malloc(num);
      223.   #endif
      224.   

crypto/mem.c:225:5: 
      223.   #endif
      224.   
      225. >     return ret;
      226.   }
      227.   

crypto/mem.c:226:1: return from a call to CRYPTO_malloc
      224.   
      225.       return ret;
      226. > }
      227.   
      228.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:233:9: Taking true branch
    231.   
    232.       FAILTEST();
    233.       if (ret != NULL)
                   ^
    234.           memset(ret, 0, num);
    235.       return ret;

crypto/mem.c:234:9: 
    232.       FAILTEST();
    233.       if (ret != NULL)
    234. >         memset(ret, 0, num);
    235.       return ret;
    236.   }

crypto/mem.c:235:5: 
    233.       if (ret != NULL)
    234.           memset(ret, 0, num);
    235. >     return ret;
    236.   }
    237.   

crypto/mem.c:236:1: return from a call to CRYPTO_zalloc
    234.           memset(ret, 0, num);
    235.       return ret;
    236. > }
    237.   
    238.   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)

crypto/ec/curve448/eddsa.c:271:13: Taking false branch
269.           uint8_t challenge[2 * EDDSA_448_PRIVATE_BYTES];
270.   
271.           if (hashctx == NULL
                   ^
272.                   || !hash_init_with_dom(hashctx, prehashed, 0, context,
273.                                          context_len)

crypto/ec/curve448/eddsa.c:272:21: 
270.   
271.           if (hashctx == NULL
272. >                 || !hash_init_with_dom(hashctx, prehashed, 0, context,
273.                                          context_len)
274.                   || !EVP_DigestUpdate(hashctx, signature, EDDSA_448_PUBLIC_BYTES)

crypto/ec/curve448/eddsa.c:48:1: start of procedure hash_init_with_dom()
  46.   }
  47.   
  48. > static c448_error_t hash_init_with_dom(EVP_MD_CTX *hashctx, uint8_t prehashed,
  49.                                          uint8_t for_prehash,
  50.                                          const uint8_t *context,

crypto/ec/curve448/eddsa.c:53:5: 
  51.                                          size_t context_len)
  52.   {
  53. >     const char *dom_s = "SigEd448";
  54.       uint8_t dom[2];
  55.   

crypto/ec/curve448/eddsa.c:56:9: Taking true branch
  54.       uint8_t dom[2];
  55.   
  56.       if (context_len > UINT8_MAX)
                ^
  57.           return C448_FAILURE;
  58.   

crypto/ec/curve448/eddsa.c:57:9: 
  55.   
  56.       if (context_len > UINT8_MAX)
  57. >         return C448_FAILURE;
  58.   
  59.       dom[0] = (uint8_t)(2 - (prehashed == 0 ? 1 : 0)

crypto/ec/curve448/eddsa.c:71:1: return from a call to hash_init_with_dom
  69.   
  70.       return C448_SUCCESS;
  71. > }
  72.   
  73.   /* In this file because it uses the hash */

crypto/ec/curve448/eddsa.c:272:21: Taking true branch
270.   
271.           if (hashctx == NULL
272.                   || !hash_init_with_dom(hashctx, prehashed, 0, context,
                           ^
273.                                          context_len)
274.                   || !EVP_DigestUpdate(hashctx, signature, EDDSA_448_PUBLIC_BYTES)

crypto/ec/curve448/eddsa.c:278:13: 
276.                   || !EVP_DigestUpdate(hashctx, message, message_len)
277.                   || !EVP_DigestFinalXOF(hashctx, challenge, sizeof(challenge))) {
278. >             EVP_MD_CTX_free(hashctx);
279.               return C448_FAILURE;
280.           }

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:295:1: start of procedure CRYPTO_free()
    293.   }
    294.   
    295. > void CRYPTO_free(void *str, const char *file, int line)
    296.   {
    297.       INCREMENT(free_count);

crypto/mem.c:298:9: Taking true branch
    296.   {
    297.       INCREMENT(free_count);
    298.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                   ^
    299.           free_impl(str, file, line);
    300.           return;

crypto/mem.c:298:30: Taking true branch
    296.   {
    297.       INCREMENT(free_count);
    298.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                                        ^
    299.           free_impl(str, file, line);
    300.           return;

crypto/mem.c:299:9: Skipping __function_pointer__(): unresolved function pointer
    297.       INCREMENT(free_count);
    298.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
    299.           free_impl(str, file, line);
                   ^
    300.           return;
    301.       }

crypto/mem.c:300:9: 
    298.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
    299.           free_impl(str, file, line);
    300. >         return;
    301.       }
    302.   

crypto/mem.c:314:1: return from a call to CRYPTO_free
    312.       free(str);
    313.   #endif
    314. > }
    315.   
    316.   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)
