mirror of https://github.com/openssl/openssl.git
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)
This commit is contained in:
parent
56d1ab3b6c
commit
0e2e4b3e69
|
|
@ -382,7 +382,7 @@ SSL *ossl_quic_new(SSL_CTX *ctx)
|
||||||
qc = OPENSSL_zalloc(sizeof(*qc));
|
qc = OPENSSL_zalloc(sizeof(*qc));
|
||||||
if (qc == NULL) {
|
if (qc == NULL) {
|
||||||
QUIC_RAISE_NON_NORMAL_ERROR(NULL, ERR_R_CRYPTO_LIB, NULL);
|
QUIC_RAISE_NON_NORMAL_ERROR(NULL, ERR_R_CRYPTO_LIB, NULL);
|
||||||
goto err;
|
return NULL;
|
||||||
}
|
}
|
||||||
#if defined(OPENSSL_THREADS)
|
#if defined(OPENSSL_THREADS)
|
||||||
if ((qc->mutex = ossl_crypto_mutex_new()) == NULL) {
|
if ((qc->mutex = ossl_crypto_mutex_new()) == NULL) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue