From c4a44e7b84c5371e6f1ac1e0a80d5fc737b2dc1c Mon Sep 17 00:00:00 2001 From: Jeeban Sethi Date: Thu, 16 Feb 2023 00:27:12 +0530 Subject: [PATCH] openssl#20299: Fixed use after free bug CLA: trivial Reviewed-by: Matt Caswell Reviewed-by: Todd Short (Merged from https://github.com/openssl/openssl/pull/20300) --- ssl/ssl_lib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 44ba62ffde..a2e2666962 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -739,6 +739,7 @@ SSL *ossl_ssl_connection_new_int(SSL_CTX *ctx, const SSL_METHOD *method) if (!ossl_ssl_init(ssl, ctx, method, SSL_TYPE_SSL_CONNECTION)) { OPENSSL_free(s); s = NULL; + ssl = NULL; goto sslerr; } -- 2.34.1