Skip to content

Commit

Permalink
QUIC APL: Fix QUIC_TLS free order
Browse files Browse the repository at this point in the history
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from #23334)
  • Loading branch information
hlandau committed Apr 19, 2024
1 parent 1a3ca23 commit 4e40ff9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ssl/quic/quic_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,9 @@ SSL *ossl_quic_new(SSL_CTX *ctx)
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;

Expand All @@ -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);
Expand Down

0 comments on commit 4e40ff9

Please sign in to comment.