From 9fc0d25b09367ad8899ae8a0b9a66f2f8f4ccc81 Mon Sep 17 00:00:00 2001 From: Jean-Frederic Clere Date: Tue, 10 Dec 2024 10:08:11 +0100 Subject: [PATCH] SSL_free() does check for != NULL (thanks Sashan) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Neil Horman Reviewed-by: Saša Nedvědický (Merged from https://github.com/openssl/openssl/pull/25859) --- demos/http3/ossl-nghttp3-demo-server.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/demos/http3/ossl-nghttp3-demo-server.c b/demos/http3/ossl-nghttp3-demo-server.c index b72ad8f7170..3ee5fa8e75f 100644 --- a/demos/http3/ossl-nghttp3-demo-server.c +++ b/demos/http3/ossl-nghttp3-demo-server.c @@ -438,12 +438,9 @@ static int quic_server_h3streams(nghttp3_conn *h3conn, struct h3ssl *h3ssl) return 0; err: fflush(stderr); - if (rstream != NULL) - SSL_free(rstream); - if (pstream != NULL) - SSL_free(pstream); - if (cstream != NULL) - SSL_free(cstream); + SSL_free(rstream); + SSL_free(pstream); + SSL_free(cstream); return -1; } -- 2.47.2