From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 EE6EF81CEA for ; Wed, 9 Nov 2016 21:42:13 -0800 (PST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP; 09 Nov 2016 21:42:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,617,1473145200"; d="scan'208";a="29537536" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga006.fm.intel.com with ESMTP; 09 Nov 2016 21:42:17 -0800 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 9 Nov 2016 21:42:17 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 9 Nov 2016 21:42:16 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.239]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.138]) with mapi id 14.03.0248.002; Thu, 10 Nov 2016 13:42:14 +0800 From: "Song, BinX" To: "Gao, Liming" , "edk2-devel@lists.01.org" CC: "Ni, Ruiyu" Thread-Topic: [PATCH] MdeModulePkg/BootLogoLib: Remove invalid if judgments Thread-Index: AdI5bGYtKg7YBQKaTfa0QQ59IHzODwAw/F1wAC+aRsA= Date: Thu, 10 Nov 2016 05:42:13 +0000 Message-ID: <559D2DF22BC9A3468B4FA1AA547F0EF13590B7@shsmsx102.ccr.corp.intel.com> References: <559D2DF22BC9A3468B4FA1AA547F0EF135530D@shsmsx102.ccr.corp.intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14B4A0C1D@shsmsx102.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14B4A0C1D@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdeModulePkg/BootLogoLib: Remove invalid if judgments X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2016 05:42:14 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Liming, In BootLogoEnableLogo() function, the FreePool(Blt) function will never be = called, some Blt related code as below: a. Blt =3D NULL; -> Step 1, Blt was initialized. ...... b. if (Blt !=3D NULL) { \ FreePool (Blt); -- Step 2, Blt was checked, the judgment is alwa= ys false. } / c. Blt =3D Image.Bitmap; Step 3, Blt get an valid value. >>From above, I think we can remove this if judgment. Best Regards, Bell Song > -----Original Message----- > From: Gao, Liming > Sent: Wednesday, November 9, 2016 10:25 AM > To: Song, BinX ; edk2-devel@lists.01.org > Cc: Ni, Ruiyu > Subject: RE: [PATCH] MdeModulePkg/BootLogoLib: Remove invalid if > judgments >=20 > Bin: > Why remove FreePool (Blt)? It is still used. >=20 > Thanks > Liming > > -----Original Message----- > > From: Song, BinX > > Sent: Tuesday, November 08, 2016 11:01 AM > > To: edk2-devel@lists.01.org > > Cc: Gao, Liming > > Subject: [PATCH] MdeModulePkg/BootLogoLib: Remove invalid if > judgments > > > > There are two invalid if judgments in BootLogoEnableLogo() function, > > remove them. > > > > Cc: Liming Gao > > Contributed-under: TianoCore Contribution Agreement 1.0 > > Signed-off-by: Bell Song > > --- > > MdeModulePkg/Library/BootLogoLib/BootLogoLib.c | 8 -------- > > 1 file changed, 8 deletions(-) > > > > diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c > > b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c > > index 2c1e8ea..b69dda8 100644 > > --- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c > > +++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c > > @@ -141,14 +141,6 @@ BootLogoEnableLogo ( > > if (EFI_ERROR (Status)) { > > break; > > } > > - > > - if (EFI_ERROR (Status)) { > > - continue; > > - } > > - > > - if (Blt !=3D NULL) { > > - FreePool (Blt); > > - } > > Blt =3D Image.Bitmap; > > > > // > > -- > > 2.7.2.windows.1