Add more check for local FileInfo variable before it is used.
authorlgao4 <lgao4@de2fecce-e211-0410-80a6-f3fac2684e05>
Wed, 2 Dec 2009 10:13:24 +0000 (10:13 +0000)
committerlgao4 <lgao4@de2fecce-e211-0410-80a6-f3fac2684e05>
Wed, 2 Dec 2009 10:13:24 +0000 (10:13 +0000)
git-svn-id: https://edk2.tianocore.org/svn/edk2/trunk@9506 de2fecce-e211-0410-80a6-f3fac2684e05

edk2/MdePkg/Library/DxeServicesLib/DxeServicesLib.c

index 107bf4b..45936d4 100644 (file)
@@ -617,7 +617,7 @@ GetFileBufferByFilePath (
             }\r
           }\r
           \r
-          if (!EFI_ERROR (Status)) {\r
+          if (!EFI_ERROR (Status) && (FileInfo != NULL)) {\r
             //\r
             // Allocate space for the file\r
             //\r