mirror of https://github.com/acidanthera/audk.git
ShellPkg/UefiDpLib: 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:
parent
9555c09717
commit
24c6962d09
|
@ -272,7 +272,7 @@ ShellCommandRunDp (
|
|||
// EndCount = Value counter counts to before it needs to be reset
|
||||
//
|
||||
Status = EfiGetSystemConfigurationTable (&gPerformanceProtocolGuid, (VOID **) &PerformanceProperty);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR (Status) || (PerformanceProperty == NULL)) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_PERF_PROPERTY_NOT_FOUND), gDpHiiHandle);
|
||||
goto Done;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue