From: Jeeban Sethi Date: Wed, 15 Feb 2023 18:57:12 +0000 (+0530) Subject: openssl#20299: Fixed use after free bug X-Git-Tag: openssl-3.2.0-alpha1~1274 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4a44e7b84c5371e6f1ac1e0a80d5fc737b2dc1c;p=thirdparty%2Fopenssl.git 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) --- diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 44ba62ffde2..a2e26669620 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; }