forked from wolfSSL/wolfssl
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:
@@ -1047,12 +1047,10 @@ void wc_ed25519_free(ed25519_key* key)
|
|||||||
wc_MemZero_Check(key, sizeof(ed25519_key));
|
wc_MemZero_Check(key, sizeof(ed25519_key));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WOLFSSL_NO_MALLOC
|
|
||||||
if (isAllocated) {
|
if (isAllocated) {
|
||||||
XFREE(key, heap, DYNAMIC_TYPE_ED25519);
|
XFREE(key, heap, DYNAMIC_TYPE_ED25519);
|
||||||
(void)heap;
|
(void)heap;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1172,12 +1172,10 @@ int wc_HashFree(wc_HashAlg* hash, enum wc_HashType type)
|
|||||||
ret = BAD_FUNC_ARG;
|
ret = BAD_FUNC_ARG;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef WOLFSSL_NO_MALLOC
|
|
||||||
if (isAllocated) {
|
if (isAllocated) {
|
||||||
XFREE(hash, heap, DYNAMIC_TYPE_HASHES);
|
XFREE(hash, heap, DYNAMIC_TYPE_HASHES);
|
||||||
(void)heap;
|
(void)heap;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user