mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
src/ssl_sess.c: in EvictSessionFromCache(), free session->ticketNonce.data if it was dynamically allocated. fixes memory leak via wolfSSL_Cleanup().
This commit is contained in:
@ -215,6 +215,17 @@
|
|||||||
#ifdef HAVE_EX_DATA
|
#ifdef HAVE_EX_DATA
|
||||||
session->ownExData = save_ownExData;
|
session->ownExData = save_ownExData;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(WOLFSSL_TLS13) && defined(HAVE_SESSION_TICKET) && \
|
||||||
|
defined(WOLFSSL_TICKET_NONCE_MALLOC) && \
|
||||||
|
(!defined(HAVE_FIPS) || (defined(FIPS_VERSION_GE) && FIPS_VERSION_GE(5,3)))
|
||||||
|
if ((session->ticketNonce.data != NULL) &&
|
||||||
|
(session->ticketNonce.data != session->ticketNonce.dataStatic))
|
||||||
|
{
|
||||||
|
XFREE(session->ticketNonce.data, NULL, DYNAMIC_TYPE_SESSION_TICK);
|
||||||
|
session->ticketNonce.data = NULL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
WOLFSSL_ABI
|
WOLFSSL_ABI
|
||||||
|
Reference in New Issue
Block a user