From 551eb3f44b3f0fa66f092fa5ec0b00cf4b9c7fe9 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Fri, 11 Oct 2024 13:19:53 -0500 Subject: [PATCH] wolfcrypt/src/ed25519.c and wolfcrypt/src/hash.c: remove gating around isAllocated XFREE()s in wc_ed25519_free() and wc_HashFree(). --- wolfcrypt/src/ed25519.c | 2 -- wolfcrypt/src/hash.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/wolfcrypt/src/ed25519.c b/wolfcrypt/src/ed25519.c index 5a06cb771..a00045388 100644 --- a/wolfcrypt/src/ed25519.c +++ b/wolfcrypt/src/ed25519.c @@ -1047,12 +1047,10 @@ void wc_ed25519_free(ed25519_key* key) wc_MemZero_Check(key, sizeof(ed25519_key)); #endif -#ifndef WOLFSSL_NO_MALLOC if (isAllocated) { XFREE(key, heap, DYNAMIC_TYPE_ED25519); (void)heap; } -#endif } diff --git a/wolfcrypt/src/hash.c b/wolfcrypt/src/hash.c index fdffa6030..4249c39ea 100644 --- a/wolfcrypt/src/hash.c +++ b/wolfcrypt/src/hash.c @@ -1172,12 +1172,10 @@ int wc_HashFree(wc_HashAlg* hash, enum wc_HashType type) ret = BAD_FUNC_ARG; }; -#ifndef WOLFSSL_NO_MALLOC if (isAllocated) { XFREE(hash, heap, DYNAMIC_TYPE_HASHES); (void)heap; } -#endif return ret; }