File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19774,12 +19774,17 @@ void wolfSSL_FreeSession(WOLFSSL_CTX* ctx, WOLFSSL_SESSION* session)
1977419774#ifdef HAVE_SESSION_TICKET
1977519775 if (session->ticketLenAlloc > 0) {
1977619776 XFREE(session->ticket, session->heap, DYNAMIC_TYPE_SESSION_TICK);
19777+ session->ticket = session->staticTicket;
19778+ session->ticketLen = 0;
19779+ session->ticketLenAlloc = 0;
1977719780 }
1977819781#if defined(WOLFSSL_TLS13) && defined(WOLFSSL_TICKET_NONCE_MALLOC) && \
1977919782 (!defined(HAVE_FIPS) || (defined(FIPS_VERSION_GE) && FIPS_VERSION_GE(5,3)))
1978019783 if (session->ticketNonce.data != session->ticketNonce.dataStatic) {
1978119784 XFREE(session->ticketNonce.data, session->heap,
1978219785 DYNAMIC_TYPE_SESSION_TICK);
19786+ session->ticketNonce.data = session->ticketNonce.dataStatic;
19787+ session->ticketNonce.len = 0;
1978319788 }
1978419789#endif /* WOLFSSL_TLS13 && WOLFSSL_TICKET_NONCE_MALLOC && FIPS_VERSION_GE(5,3)*/
1978519790#endif
You can’t perform that action at this time.
0 commit comments