]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Check the return code from CoreLocateDevicePath() in MdeModulePkg/Core/Dxe/Image...
authorlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 6 Sep 2012 05:00:34 +0000 (05:00 +0000)
committerlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 6 Sep 2012 05:00:34 +0000 (05:00 +0000)
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13703 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Core/Dxe/Image/Image.c

index a3cffcefc18622da2027f436aade49a32d3c9790..16fc91056a2f927a189ef9352efd6180bc22c5cf 100644 (file)
@@ -1079,7 +1079,10 @@ CoreLoadImageCommon (
   if (SourceBuffer != NULL) {\r
     FHand.Source     = SourceBuffer;\r
     FHand.SourceSize = SourceSize;\r
-    CoreLocateDevicePath (&gEfiDevicePathProtocolGuid, &HandleFilePath, &DeviceHandle);\r
+    Status = CoreLocateDevicePath (&gEfiDevicePathProtocolGuid, &HandleFilePath, &DeviceHandle);\r
+    if (EFI_ERROR (Status)) {\r
+      DeviceHandle = NULL;\r
+    }\r
     if (SourceSize > 0) {\r
       Status = EFI_SUCCESS;\r
     } else {\r