mirror of https://github.com/openssl/openssl
Check for NULL when freeing the QUIC_TLS object
Free functions are expected to be tolerant of a NULL pointer being passed. Fixes the problem in https://github.com/openssl/openssl/pull/21668#issuecomment-1782718328 Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22536)
This commit is contained in:
parent
497a7810bc
commit
8d13d9e730
|
@ -654,6 +654,8 @@ QUIC_TLS *ossl_quic_tls_new(const QUIC_TLS_ARGS *args)
|
|||
|
||||
void ossl_quic_tls_free(QUIC_TLS *qtls)
|
||||
{
|
||||
if (qtls == NULL)
|
||||
return;
|
||||
OSSL_ERR_STATE_free(qtls->error_state);
|
||||
OPENSSL_free(qtls);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue