diff options
author | Matt Caswell <matt@openssl.org> | 2023-10-27 12:22:11 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2023-10-31 11:40:47 +0000 |
commit | e99c771985cbaf6ae55912b581d115f5097fe2fd (patch) | |
tree | 4ff553b30e7785f42560c724fca075924e7d8170 /ssl | |
parent | f205958d9f9a2ead9edc088b0d3f060ee7c5b8c4 (diff) |
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)
(cherry picked from commit 8d13d9e7305643c28c69c57df798b553b78c2876)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/quic/quic_tls.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ssl/quic/quic_tls.c b/ssl/quic/quic_tls.c index af4af56c77..25687db2fb 100644 --- a/ssl/quic/quic_tls.c +++ b/ssl/quic/quic_tls.c @@ -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); } |