Reviewed-by: Qiu Shumin <[email protected]> -----Original Message----- From: Fan, Jeff Sent: Wednesday, December 09, 2015 2:57 PM To: [email protected] Cc: Qiu, Shumin; Kinney, Michael D Subject: [Patch] 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]> --- UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c index f5b3460..199e165 100644 --- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c +++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c @@ -1489,7 +1489,9 @@ MtrrSetMemoryAttributeWorker ( 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; -- 1.9.5.msysgit.0 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

