Merge pull request #1060 from SparkiDev/tls13_memleak
Fix memory leak when not using fast math and TLS13.
This commit is contained in:
commit
fbf4e94bcf
@ -5059,6 +5059,14 @@ static void TLSX_KeyShare_FreeAll(KeyShareEntry* list, void* heap)
|
||||
|
||||
while ((current = list) != NULL) {
|
||||
list = current->next;
|
||||
if ((current->group & NAMED_DH_MASK) == 0) {
|
||||
#ifdef HAVE_CURVE25519
|
||||
if (current->group == WOLFSSL_ECC_X25519) {
|
||||
}
|
||||
else
|
||||
#endif
|
||||
wc_ecc_free(current->key);
|
||||
}
|
||||
XFREE(current->key, heap, DYNAMIC_TYPE_PRIVATE_KEY);
|
||||
XFREE(current->ke, heap, DYNAMIC_TYPE_PUBLIC_KEY);
|
||||
XFREE(current, heap, DYNAMIC_TYPE_TLSX);
|
||||
|
Loading…
x
Reference in New Issue
Block a user