mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
OSSL_HTTP_open(): Fix memory leak on TLS connect failure via proxy
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16119)
This commit is contained in:
parent
c74188e86c
commit
981a5b7ce3
@ -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);
|
cbio = (*bio_update_fn)(cbio, arg, 1 /* connect */, use_ssl);
|
||||||
if (cbio == NULL) {
|
if (cbio == NULL) {
|
||||||
cbio = orig_bio;
|
if (bio == NULL) /* cbio was not provided by caller */
|
||||||
|
BIO_free_all(orig_bio);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user