diff options
author | Hugo Landau <hlandau@openssl.org> | 2023-03-21 15:19:34 +0000 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-03-30 11:14:16 +0100 |
commit | 9cf091a3c5f34277dca1cac979c7d632c7236d7b (patch) | |
tree | 83eece0baa57348f49e692291c510ba0de194689 /ssl/quic/quic_tserver.c | |
parent | 6c091ca968f4c62744a5161d54f2c2dd89a76993 (diff) |
QUIC Thread Assisted mode: miscellaneous fixes
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20348)
Diffstat (limited to 'ssl/quic/quic_tserver.c')
-rw-r--r-- | ssl/quic/quic_tserver.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ssl/quic/quic_tserver.c b/ssl/quic/quic_tserver.c index a0660458d4..a94a6b9dbe 100644 --- a/ssl/quic/quic_tserver.c +++ b/ssl/quic/quic_tserver.c @@ -70,7 +70,7 @@ QUIC_TSERVER *ossl_quic_tserver_new(const QUIC_TSERVER_ARGS *args, srv->args = *args; - if ((srv->mutex = CRYPTO_THREAD_lock_new()) == NULL) + if ((srv->mutex = ossl_crypto_mutex_new()) == NULL) goto err; srv->ctx = SSL_CTX_new_ex(srv->args.libctx, srv->args.propq, TLS_method()); @@ -111,8 +111,10 @@ QUIC_TSERVER *ossl_quic_tserver_new(const QUIC_TSERVER_ARGS *args, return srv; err: - if (srv != NULL) + if (srv != NULL) { ossl_quic_channel_free(srv->ch); + ossl_crypto_mutex_free(&srv->mutex); + } OPENSSL_free(srv); return NULL; @@ -128,7 +130,7 @@ void ossl_quic_tserver_free(QUIC_TSERVER *srv) BIO_free(srv->args.net_wbio); SSL_free(srv->tls); SSL_CTX_free(srv->ctx); - CRYPTO_THREAD_lock_free(srv->mutex); + ossl_crypto_mutex_free(&srv->mutex); OPENSSL_free(srv); } |