wolfcrypt/src/ed25519.c and wolfcrypt/src/hash.c: remove gating around isAllocated XFREE()s in wc_ed25519_free() and wc_HashFree().

This commit is contained in:
Daniel Pouzzner 2024-10-11 13:19:53 -05:00
parent dc2a8118de
commit 551eb3f44b
2 changed files with 0 additions and 4 deletions

View File

@ -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
}

View File

@ -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;
}