summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2017-12-13 11:26:23 +0800
committerStar Zeng <star.zeng@intel.com>2017-12-13 18:34:32 +0800
commit1cf2410047f573a81daed28ed425eef54f18bf64 (patch)
tree021fe88f3dfe46a77a0fe4fb14171af8ecee4925 /MdeModulePkg
parent5c59537c1092a1372913274636a8d766fdd97e61 (diff)
downloadedk2-1cf2410047f573a81daed28ed425eef54f18bf64.zip
edk2-1cf2410047f573a81daed28ed425eef54f18bf64.tar.gz
edk2-1cf2410047f573a81daed28ed425eef54f18bf64.tar.bz2
MdeModulePkg PiSmmCore: Ensure SxDispatch not NULL before dereferenced
Cc: Hao Wu <hao.a.wu@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Core/PiSmmCore/PiSmmCore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
index 1ccb9c7..f136b5d 100644
--- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
+++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
@@ -321,7 +321,7 @@ SmmReadyToBootHandler (
NULL,
(VOID **)&SxDispatch
);
- if (!EFI_ERROR (Status)) {
+ if (!EFI_ERROR (Status) && (SxDispatch != NULL)) {
//
// Register a S3 entry callback function to
// determine if it will be during S3 resume.