UefiCpuPkg/MtrrLib:Initialize local variables before use them

Cc: Shumin Qiu <shumin.qiu@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19183 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Jeff Fan 2015-12-10 07:10:13 +00:00 committed by vanjeff
parent abef2c8547
commit 2d675c1c8c
1 changed files with 3 additions and 1 deletions

View File

@ -1490,6 +1490,8 @@ MtrrSetMemoryAttributeWorker (
MTRR_VARIABLE_SETTINGS *VariableSettings;
MtrrContextValid = FALSE;
VariableMtrrCount = 0;
ZeroMem (&WorkingFixedSettings, sizeof (WorkingFixedSettings));
for (Index = 0; Index < MTRR_NUMBER_OF_FIXED_MTRR; Index++) {
FixedSettingsValid[Index] = FALSE;
FixedSettingsModified[Index] = FALSE;