diff options
author | lzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-09-06 05:00:34 +0000 |
---|---|---|
committer | lzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-09-06 05:00:34 +0000 |
commit | 0407056e649dfe095e6d6e218a619a512896a9ae (patch) | |
tree | 2d3d4a63744210f9ee4f3b15286cfb47992de906 | |
parent | 59f968ccc86d7f78aed63401b3e2358ee674a650 (diff) | |
download | edk2-platforms-0407056e649dfe095e6d6e218a619a512896a9ae.tar.xz |
Check the return code from CoreLocateDevicePath() in MdeModulePkg/Core/Dxe/Image/Image.c CoreLoadImageCommon().
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
-rw-r--r-- | MdeModulePkg/Core/Dxe/Image/Image.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c index a3cffcefc1..16fc91056a 100644 --- a/MdeModulePkg/Core/Dxe/Image/Image.c +++ b/MdeModulePkg/Core/Dxe/Image/Image.c @@ -1079,7 +1079,10 @@ CoreLoadImageCommon ( if (SourceBuffer != NULL) {
FHand.Source = SourceBuffer;
FHand.SourceSize = SourceSize;
- CoreLocateDevicePath (&gEfiDevicePathProtocolGuid, &HandleFilePath, &DeviceHandle);
+ Status = CoreLocateDevicePath (&gEfiDevicePathProtocolGuid, &HandleFilePath, &DeviceHandle);
+ if (EFI_ERROR (Status)) {
+ DeviceHandle = NULL;
+ }
if (SourceSize > 0) {
Status = EFI_SUCCESS;
} else {
|