Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23334)
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;
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);