mirror of https://github.com/acidanthera/audk.git
MdeModulePkg Variable: ###VariableTotalSize need to be initialized to 0 first
HwErrVariableTotalSize/CommonVariableTotalSize/CommonUserVariableTotalSize need to be initialized to 0 first after reclaim failed, then to be assigned by += operation. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19572 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
3af5808515
commit
b2c59ce83c
|
@ -1191,6 +1191,9 @@ Reclaim (
|
|||
mVariableModuleGlobal->CommonVariableTotalSize = CommonVariableTotalSize;
|
||||
mVariableModuleGlobal->CommonUserVariableTotalSize = CommonUserVariableTotalSize;
|
||||
} else {
|
||||
mVariableModuleGlobal->HwErrVariableTotalSize = 0;
|
||||
mVariableModuleGlobal->CommonVariableTotalSize = 0;
|
||||
mVariableModuleGlobal->CommonUserVariableTotalSize = 0;
|
||||
Variable = GetStartPointer ((VARIABLE_STORE_HEADER *)(UINTN)VariableBase);
|
||||
while (IsValidVariableHeader (Variable, GetEndPointer ((VARIABLE_STORE_HEADER *)(UINTN)VariableBase))) {
|
||||
NextVariable = GetNextVariablePtr (Variable);
|
||||
|
|
Loading…
Reference in New Issue