Skip to content

Commit

Permalink
ossl_quic_new(): Avoid dereferencing NULL qc during cleanup
Browse files Browse the repository at this point in the history
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 #22606)
  • Loading branch information
t8m authored and hlandau committed Nov 6, 2023
1 parent 56d1ab3 commit 0e2e4b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ssl/quic/quic_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0e2e4b3

Please sign in to comment.