Skip to content

Commit

Permalink
MdeModulePkg/SMM: Initialize 'WillReturn' variable
Browse files Browse the repository at this point in the history
The local variable 'WillReturn' was being used without prior
initialization in some code paths.
This patch ensures that 'WillReturn' is properly initialized
to prevent undefined behavior.

Signed-off-by: Zhiguang Liu <[email protected]>
  • Loading branch information
LiuZhiguang001 authored and Javagedes committed Sep 24, 2024
1 parent 85f4938 commit f254700
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions MdeModulePkg/Core/PiSmmCore/Smi.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ SmiManage (

PERF_FUNCTION_BEGIN ();
mSmiManageCallingDepth++;
WillReturn = FALSE;
Status = EFI_NOT_FOUND;
ReturnStatus = Status;
if (HandlerType == NULL) {
Expand Down

0 comments on commit f254700

Please sign in to comment.