forked from wolfSSL/wolfssl
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
|
||||
session->ownExData = save_ownExData;
|
||||
#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
|
||||
|
Reference in New Issue
Block a user