mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 12:44:45 +02:00
fix memory leaks
This commit is contained in:
@@ -7993,6 +7993,11 @@ void SSL_ResourceFree(WOLFSSL* ssl)
|
||||
}
|
||||
FreeSuites(ssl);
|
||||
FreeHandshakeHashes(ssl);
|
||||
#ifdef HAVE_ECH
|
||||
/* try to free the ech hashes in case we errored out */
|
||||
ssl->hsHashes = ssl->hsHashesEch;
|
||||
FreeHandshakeHashes(ssl);
|
||||
#endif
|
||||
XFREE(ssl->buffers.domainName.buffer, ssl->heap, DYNAMIC_TYPE_DOMAIN);
|
||||
|
||||
/* clear keys struct after session */
|
||||
|
@@ -11808,6 +11808,9 @@ static int TLSX_ECH_Parse(WOLFSSL* ssl, const byte* readBuf, word16 size,
|
||||
/* set the ech payload of the copy to zeros */
|
||||
XMEMSET(aadCopy + (readBuf_p - ech->aad), 0,
|
||||
ech->innerClientHelloLen + AES_BLOCK_SIZE);
|
||||
/* free the old ech in case this is our second client hello */
|
||||
if (ech->innerClientHello != NULL)
|
||||
XFREE(ech->innerClientHello, ssl->heap, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
/* allocate the inner payload buffer */
|
||||
ech->innerClientHello =
|
||||
(byte*)XMALLOC(ech->innerClientHelloLen + HANDSHAKE_HEADER_SZ,
|
||||
|
Reference in New Issue
Block a user