]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/PiSmmCore/Pool.c
MdeModulePkg/PiSmmCore: Fix potentially uninitialized local variable
[mirror_edk2.git] / 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