QUIC APL: Fix QUIC_TLS free order

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23334)
This commit is contained in:
Hugo Landau 2024-02-05 13:34:01 +00:00 committed by Neil Horman
parent d2ee7ceff0
commit 882c77e93e
1 changed files with 3 additions and 3 deletions

View File

@ -524,6 +524,9 @@ err:
QUIC_NEEDS_LOCK
static void qc_cleanup(QUIC_CONNECTION *qc, int have_lock)
{
SSL_free(qc->tls);
qc->tls = NULL;
ossl_quic_channel_free(qc->ch);
qc->ch = NULL;
@ -543,9 +546,6 @@ static void qc_cleanup(QUIC_CONNECTION *qc, int have_lock)
ossl_quic_engine_free(qc->engine);
qc->engine = NULL;
SSL_free(qc->tls);
qc->tls = NULL;
if (have_lock)
/* tsan doesn't like freeing locked mutexes */
ossl_crypto_mutex_unlock(qc->mutex);