From: Hugo Landau Date: Mon, 22 May 2023 12:24:02 +0000 (+0100) Subject: QUIC APL: Unlock mutex before freeing (clang tsan error) X-Git-Tag: openssl-3.2.0-alpha1~773 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45b7c7e06e8d28ad9a7ea0f7662ec04f283f7c36;p=thirdparty%2Fopenssl.git QUIC APL: Unlock mutex before freeing (clang tsan error) Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/20856) --- diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c index ac0e9f03806..cd54eda1c21 100644 --- a/ssl/quic/quic_impl.c +++ b/ssl/quic/quic_impl.c @@ -444,8 +444,9 @@ void ossl_quic_free(SSL *s) /* Note: SSL_free calls OPENSSL_free(qc) for us */ SSL_free(ctx.qc->tls); + quic_unlock(ctx.qc); /* tsan doesn't like freeing locked mutexes */ #if defined(OPENSSL_THREADS) - ossl_crypto_mutex_free(&ctx.qc->mutex); /* freed while still locked */ + ossl_crypto_mutex_free(&ctx.qc->mutex); #endif }