[openssl] master update

dev at ddvo.net dev at ddvo.net
Thu Jul 22 08:15:33 UTC 2021


The branch master has been updated
       via  981a5b7ce3bcdf4748162073c3dbd096c82d3c69 (commit)
      from  c74188e86c78c4fa47c4a658e1355c40524fadb4 (commit)


- Log -----------------------------------------------------------------
commit 981a5b7ce3bcdf4748162073c3dbd096c82d3c69
Author: Dr. David von Oheimb <David.von.Oheimb at siemens.com>
Date:   Tue Jul 20 11:19:39 2021 +0200

    OSSL_HTTP_open(): Fix memory leak on TLS connect failure via proxy
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    Reviewed-by: Paul Dale <pauli at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/16119)

-----------------------------------------------------------------------

Summary of changes:
 crypto/http/http_client.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/crypto/http/http_client.c b/crypto/http/http_client.c
index 779e4b7203..bb80836cd1 100644
--- a/crypto/http/http_client.c
+++ b/crypto/http/http_client.c
@@ -926,7 +926,8 @@ OSSL_HTTP_REQ_CTX *OSSL_HTTP_open(const char *server, const char *port,
 
         cbio = (*bio_update_fn)(cbio, arg, 1 /* connect */, use_ssl);
         if (cbio == NULL) {
-            cbio = orig_bio;
+            if (bio == NULL) /* cbio was not provided by caller */
+                BIO_free_all(orig_bio);
             goto end;
         }
     }


More information about the openssl-commits mailing list