From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9F50621E1DB4F for ; Sun, 30 Jul 2017 23:02:04 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jul 2017 23:04:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,440,1496127600"; d="scan'208";a="999013883" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga003.jf.intel.com with ESMTP; 30 Jul 2017 23:04:11 -0700 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 30 Jul 2017 23:04:11 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 30 Jul 2017 23:04:11 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.116]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0319.002; Mon, 31 Jul 2017 14:04:09 +0800 From: "Long, Qin" To: "Wu, Jiaxin" , "edk2-devel@lists.01.org" CC: "Ye, Ting" , "Wu, Jiaxin" Thread-Topic: [edk2] [Patch 1/2] CryptoPkg/TlsLib: Remove the redundant free of BIO objects Thread-Index: AQHTCb+ZooKvbI8QY0iPFAP2lIF/CKJtcgmA Date: Mon, 31 Jul 2017 06:04:08 +0000 Message-ID: References: <1501479637-42288-1-git-send-email-jiaxin.wu@intel.com> <1501479637-42288-2-git-send-email-jiaxin.wu@intel.com> In-Reply-To: <1501479637-42288-2-git-send-email-jiaxin.wu@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch 1/2] CryptoPkg/TlsLib: Remove the redundant free of BIO objects X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 06:02:04 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Long Qin -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jiax= in Wu Sent: Monday, July 31, 2017 1:41 PM To: edk2-devel@lists.01.org Cc: Ye, Ting ; Wu, Jiaxin ; Long, Q= in Subject: [edk2] [Patch 1/2] 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 Cc: Long Qin Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin --- CryptoPkg/Library/TlsLib/TlsInit.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/CryptoPkg/Library/TlsLib/TlsInit.c b/CryptoPkg/Library/TlsLib/= TlsInit.c index e2c9744..e524647 100644 --- a/CryptoPkg/Library/TlsLib/TlsInit.c +++ b/CryptoPkg/Library/TlsLib/TlsInit.c @@ -128,24 +128,16 @@ TlsFree ( if (TlsConn =3D=3D NULL) { return; } =20 // - // Free the internal TLS and BIO objects. + // Free the internal TLS and related BIO objects. // if (TlsConn->Ssl !=3D NULL) { SSL_free (TlsConn->Ssl); } =20 - if (TlsConn->InBio !=3D NULL) { - BIO_free (TlsConn->InBio); - } - - if (TlsConn->OutBio !=3D NULL) { - BIO_free (TlsConn->OutBio); - } - OPENSSL_free (Tls); } =20 /** Create a new TLS object for a connection. --=20 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel