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:02 +0000 |
commit | 8d13d9e7305643c28c69c57df798b553b78c2876 (patch) | |
tree | e3af690ebcb10e5a59a657138d3170d1c1e93cc8 /ssl | |
parent | 497a7810bcee48781aa12d4db870f6a565bd0592 (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)
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); } |