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:
parent
dc2a8118de
commit
551eb3f44b
@ -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
|
||||
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user