]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/PiSmmCore: Fix potentially uninitialized local variable
authorHao Wu <hao.a.wu@intel.com>
Mon, 20 Mar 2017 07:07:27 +0000 (15:07 +0800)
committerHao Wu <hao.a.wu@intel.com>
Fri, 14 Apr 2017 05:13:35 +0000 (13:13 +0800)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
MdeModulePkg/Core/PiSmmCore/Pool.c

index f734b3f72db4508d950ee406dfdd8123f1c64be1..43ce869d1e1a4d49efb4ff7d6b169b837b33af35 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   SMM Memory pool management functions.\r
 \r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials are licensed and made available \r
   under the terms and conditions of the BSD License which accompanies this \r
   distribution.  The full text of the license may be found at        \r
@@ -136,6 +136,7 @@ InternalAllocPoolByIndex (
   EFI_PHYSICAL_ADDRESS  Address;\r
   SMM_POOL_TYPE         SmmPoolType;\r
 \r
+  Address     = 0;\r
   SmmPoolType = UefiMemoryTypeToSmmPoolType(PoolType);\r
 \r
   ASSERT (PoolIndex <= MAX_POOL_INDEX);\r
@@ -227,6 +228,8 @@ SmmInternalAllocatePool (
   EFI_PHYSICAL_ADDRESS  Address;\r
   UINTN                 PoolIndex;\r
 \r
+  Address = 0;\r
+\r
   if (PoolType != EfiRuntimeServicesCode &&\r
       PoolType != EfiRuntimeServicesData) {\r
     return EFI_INVALID_PARAMETER;\r