summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Library
diff options
context:
space:
mode:
authorwenyi,xie via groups.io <xiewenyi2=huawei.com@groups.io>2021-11-30 09:51:10 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-03 09:57:17 +0000
commitdfafa8e45382939fb5dc78e9d37b97b500a43613 (patch)
tree6b5a6369690c773f1b4cba6815822e2373488ba0 /MdeModulePkg/Library
parentf0f3f5aae7c4d346ea5e24970936d80dc5b60657 (diff)
downloadedk2-dfafa8e45382939fb5dc78e9d37b97b500a43613.tar.gz
edk2-dfafa8e45382939fb5dc78e9d37b97b500a43613.tar.bz2
edk2-dfafa8e45382939fb5dc78e9d37b97b500a43613.zip
MdeModulePkg/DxeCorePerformanceLib:Variable Initial
SmmBootRecordDataSize is initialized in InternalGetSmmPerData, but this function may fail. so to avoid using SmmBootRecordDataSize without intialization, set it to 0 at first. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Dandan Bi <dandan.bi@intel.com> Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Diffstat (limited to 'MdeModulePkg/Library')
-rw-r--r--MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
index 532b3f8c90..f8778c2518 100644
--- a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
+++ b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
@@ -1373,6 +1373,8 @@ UpdateBootPerformanceTable (
UINTN AppendSize;
UINT8 *FirmwarePerformanceTablePtr;
+ SmmBootRecordDataSize = 0;
+
//
// Get SMM performance data.
//