summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorNan Xiao <nan@chinadtrace.org>2021-03-29 12:24:08 +0800
committerTomas Mraz <tomas@openssl.org>2021-03-30 18:52:53 +0200
commit7947a1eb13c221bbc034796bd394ba00b0e2387d (patch)
treef3c4d7fbd65da37ad0510d79109d58bb82f2b027 /ssl
parent4f10a996e5123c20315912149f586c481960e0de (diff)
Fix BIO_new_ssl_connect() to not leak memory
CLA: trivial Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14719)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/bio_ssl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ssl/bio_ssl.c b/ssl/bio_ssl.c
index 033781fcf5..47fe936252 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;