From: Nan Xiao Date: Mon, 29 Mar 2021 04:24:08 +0000 (+0800) Subject: Fix BIO_new_ssl_connect() to not leak memory X-Git-Tag: OpenSSL_1_1_1l~110 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd988967bb14ce49b01c399b5d2c466852c105e4;p=thirdparty%2Fopenssl.git Fix BIO_new_ssl_connect() to not leak memory CLA: trivial Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/14719) (cherry picked from commit 7947a1eb13c221bbc034796bd394ba00b0e2387d) --- diff --git a/ssl/bio_ssl.c b/ssl/bio_ssl.c index 53129bfb881..75c78b9a685 100644 --- a/ssl/bio_ssl.c +++ b/ssl/bio_ssl.c @@ -451,6 +451,7 @@ BIO *BIO_new_ssl_connect(SSL_CTX *ctx) goto err; return ret; err: + BIO_free(ssl); BIO_free(con); #endif return NULL;