diff options
author | Tomas Mraz <tomas@openssl.org> | 2023-11-03 08:52:43 +0100 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-11-06 07:50:55 +0000 |
commit | e2c6a1d9a0df7a468f73a7ba62a33a860daa9bb6 (patch) | |
tree | c9ec510b76682d579fa9b9b3ac51bcd6ef0cd957 | |
parent | b4081e6ca4a855d09c93dd62658ab808f1273dc6 (diff) |
ossl_quic_new(): Avoid dereferencing NULL qc during cleanup
Fixes Coverity 1548383
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22606)
(cherry picked from commit 0e2e4b3e69d4012f47b6908c2d8a13ec4e2d40e0)
-rw-r--r-- | ssl/quic/quic_impl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c index dd689865e4..399d1d2afd 100644 --- a/ssl/quic/quic_impl.c +++ b/ssl/quic/quic_impl.c @@ -382,7 +382,7 @@ SSL *ossl_quic_new(SSL_CTX *ctx) qc = OPENSSL_zalloc(sizeof(*qc)); if (qc == NULL) { QUIC_RAISE_NON_NORMAL_ERROR(NULL, ERR_R_CRYPTO_LIB, NULL); - goto err; + return NULL; } #if defined(OPENSSL_THREADS) if ((qc->mutex = ossl_crypto_mutex_new()) == NULL) { |