diff options
author | Star Zeng <star.zeng@intel.com> | 2015-12-29 09:00:58 +0000 |
---|---|---|
committer | lzeng14 <lzeng14@Edk2> | 2015-12-29 09:00:58 +0000 |
commit | b2c59ce83cf857cfe9868525526001a7944f3d33 (patch) | |
tree | dbc6cf24310ca4cd2fd1520f168c3ea72dd3f858 /MdeModulePkg | |
parent | 3af580851537bbd7e8202db77aea82a6dd54a1d5 (diff) | |
download | edk2-platforms-b2c59ce83cf857cfe9868525526001a7944f3d33.tar.xz |
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
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c index 8a07f0ecb6..1cb0409e97 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c @@ -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);
|