Revision: 19183
          http://sourceforge.net/p/edk2/code/19183
Author:   vanjeff
Date:     2015-12-10 07:10:13 +0000 (Thu, 10 Dec 2015)
Log Message:
-----------
UefiCpuPkg/MtrrLib:Initialize local variables before use them

Cc: Shumin Qiu <[email protected]>
Cc: Michael Kinney <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <[email protected]>
Reviewed-by: Shumin Qiu <[email protected]>

Modified Paths:
--------------
    trunk/edk2/UefiCpuPkg/Library/MtrrLib/MtrrLib.c

Modified: trunk/edk2/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
===================================================================
--- trunk/edk2/UefiCpuPkg/Library/MtrrLib/MtrrLib.c     2015-12-10 07:09:45 UTC 
(rev 19182)
+++ trunk/edk2/UefiCpuPkg/Library/MtrrLib/MtrrLib.c     2015-12-10 07:10:13 UTC 
(rev 19183)
@@ -1489,7 +1489,9 @@
   UINT64                    NewValue;
   MTRR_VARIABLE_SETTINGS    *VariableSettings;
 
-  MtrrContextValid = FALSE;
+  MtrrContextValid  = FALSE;
+  VariableMtrrCount = 0;
+  ZeroMem (&WorkingFixedSettings, sizeof (WorkingFixedSettings));
   for (Index = 0; Index < MTRR_NUMBER_OF_FIXED_MTRR; Index++) {
     FixedSettingsValid[Index]    = FALSE;
     FixedSettingsModified[Index] = FALSE;


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to