From: Tomas Mraz Date: Fri, 3 Nov 2023 07:52:43 +0000 (+0100) Subject: ossl_quic_new(): Avoid dereferencing NULL qc during cleanup X-Git-Tag: openssl-3.3.0-alpha1~667 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e2e4b3e69d4012f47b6908c2d8a13ec4e2d40e0;p=thirdparty%2Fopenssl.git ossl_quic_new(): Avoid dereferencing NULL qc during cleanup Fixes Coverity 1548383 Reviewed-by: Hugo Landau Reviewed-by: Matt Caswell Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/22606) --- diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c index dd689865e40..399d1d2afd1 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) {