]> git.proxmox.com Git - mirror_edk2.git/blobdiff - PerformancePkg/Dp_App/Dp.c
PerformancePkg/Dp_App: Add check to avoid NULL pointer deference
[mirror_edk2.git] / PerformancePkg / Dp_App / Dp.c
index e2cb862364abd1a738f933c675d24a921918d6e1..4cdc39edb42e75ccf0221839550df5fa9fab0f2b 100644 (file)
@@ -400,7 +400,7 @@ InitializeDp (
       //      EndCount = Value counter counts to before it needs to be reset\r
       //\r
       Status = EfiGetSystemConfigurationTable (&gPerformanceProtocolGuid, (VOID **) &PerformanceProperty);\r
-      if (EFI_ERROR (Status)) {\r
+      if (EFI_ERROR (Status) || (PerformanceProperty == NULL)) {\r
         PrintToken (STRING_TOKEN (STR_PERF_PROPERTY_NOT_FOUND));\r
         goto Done;\r
       }\r