From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 E3ACF21A04811 for ; Thu, 13 Apr 2017 20:40:52 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Apr 2017 20:40:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,197,1488873600"; d="scan'208";a="845904966" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by FMSMGA003.fm.intel.com with ESMTP; 13 Apr 2017 20:40:52 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 13 Apr 2017 20:40:52 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 13 Apr 2017 20:40:52 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.246]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.224]) with mapi id 14.03.0319.002; Fri, 14 Apr 2017 11:40:48 +0800 From: "Yao, Jiewen" To: "Wu, Hao A" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] MdeModulePkg/PiSmmCore: Fix potentially uninitialized local variable Thread-Index: AQHSscHmgJwShj9tzEWblmUmAwg63qHEPj7g Date: Fri, 14 Apr 2017 03:40:47 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503A92C47F@shsmsx102.ccr.corp.intel.com> References: <20170410061514.14300-1-hao.a.wu@intel.com> In-Reply-To: <20170410061514.14300-1-hao.a.wu@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdeModulePkg/PiSmmCore: Fix potentially uninitialized local variable 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: Fri, 14 Apr 2017 03:40:53 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: jiewen.yao@intel.com > -----Original Message----- > From: Wu, Hao A > Sent: Monday, April 10, 2017 2:15 PM > To: edk2-devel@lists.01.org > Cc: Wu, Hao A ; Yao, Jiewen > Subject: [PATCH] MdeModulePkg/PiSmmCore: Fix potentially uninitialized lo= cal > variable >=20 > Cc: Jiewen Yao > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Hao Wu > --- > MdeModulePkg/Core/PiSmmCore/Pool.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) >=20 > diff --git a/MdeModulePkg/Core/PiSmmCore/Pool.c > b/MdeModulePkg/Core/PiSmmCore/Pool.c > index f734b3f72d..43ce869d1e 100644 > --- a/MdeModulePkg/Core/PiSmmCore/Pool.c > +++ b/MdeModulePkg/Core/PiSmmCore/Pool.c > @@ -1,7 +1,7 @@ > /** @file > SMM Memory pool management functions. >=20 > - Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
> + Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
> This program and the accompanying materials are licensed and made avai= lable > under the terms and conditions of the BSD License which accompanies th= is > distribution. The full text of the license may be found at > @@ -136,6 +136,7 @@ InternalAllocPoolByIndex ( > EFI_PHYSICAL_ADDRESS Address; > SMM_POOL_TYPE SmmPoolType; >=20 > + Address =3D 0; > SmmPoolType =3D UefiMemoryTypeToSmmPoolType(PoolType); >=20 > ASSERT (PoolIndex <=3D MAX_POOL_INDEX); > @@ -227,6 +228,8 @@ SmmInternalAllocatePool ( > EFI_PHYSICAL_ADDRESS Address; > UINTN PoolIndex; >=20 > + Address =3D 0; > + > if (PoolType !=3D EfiRuntimeServicesCode && > PoolType !=3D EfiRuntimeServicesData) { > return EFI_INVALID_PARAMETER; > -- > 2.12.0.windows.1