PerformancePkg/Dp_App: Add check to avoid NULL pointer deference

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
Hao Wu 2017-02-27 09:26:27 +08:00
parent 14e3b94964
commit 9555c09717
1 changed files with 1 additions and 1 deletions

View File

@ -400,7 +400,7 @@ InitializeDp (
// EndCount = Value counter counts to before it needs to be reset // EndCount = Value counter counts to before it needs to be reset
// //
Status = EfiGetSystemConfigurationTable (&gPerformanceProtocolGuid, (VOID **) &PerformanceProperty); Status = EfiGetSystemConfigurationTable (&gPerformanceProtocolGuid, (VOID **) &PerformanceProperty);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status) || (PerformanceProperty == NULL)) {
PrintToken (STRING_TOKEN (STR_PERF_PROPERTY_NOT_FOUND)); PrintToken (STRING_TOKEN (STR_PERF_PROPERTY_NOT_FOUND));
goto Done; goto Done;
} }