summaryrefslogtreecommitdiffstats
path: root/CryptoPkg
diff options
context:
space:
mode:
authorJiaxin Wu <jiaxin.wu@intel.com>2017-07-31 13:29:40 +0800
committerJiaxin Wu <jiaxin.wu@intel.com>2017-08-02 15:31:46 +0800
commit6aac2db4a11432b11ba92a0d1652d6ec3d81f353 (patch)
treeb16664a1db89fd1a03c68895010bf64f6067c0b2 /CryptoPkg
parent9ef28ed3126f3890174ee966c6d48246b80b8ab8 (diff)
downloadedk2-6aac2db4a11432b11ba92a0d1652d6ec3d81f353.tar.gz
edk2-6aac2db4a11432b11ba92a0d1652d6ec3d81f353.tar.bz2
edk2-6aac2db4a11432b11ba92a0d1652d6ec3d81f353.zip
CryptoPkg/TlsLib: Remove the redundant free of BIO objects
TLS BIO objects (InBio/OutBio) will be freed by SSL_free() function. So, the following free operation (BIO_free) in TlsFree is redundant. It can be removed directly. Cc: Ye Ting <ting.ye@intel.com> Cc: Long Qin <qin.long@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Long Qin <qin.long@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Diffstat (limited to 'CryptoPkg')
-rw-r--r--CryptoPkg/Library/TlsLib/TlsInit.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/CryptoPkg/Library/TlsLib/TlsInit.c b/CryptoPkg/Library/TlsLib/TlsInit.c
index e2c9744a44..e524647103 100644
--- a/CryptoPkg/Library/TlsLib/TlsInit.c
+++ b/CryptoPkg/Library/TlsLib/TlsInit.c
@@ -130,20 +130,12 @@ TlsFree (
}
//
- // Free the internal TLS and BIO objects.
+ // Free the internal TLS and related BIO objects.
//
if (TlsConn->Ssl != NULL) {
SSL_free (TlsConn->Ssl);
}
- if (TlsConn->InBio != NULL) {
- BIO_free (TlsConn->InBio);
- }
-
- if (TlsConn->OutBio != NULL) {
- BIO_free (TlsConn->OutBio);
- }
-
OPENSSL_free (Tls);
}