summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2012-04-24 01:38:40 +0000
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2012-04-24 01:38:40 +0000
commitb08b7ba4516f0c7dbe34aa4f9166d41cd9fb4c84 (patch)
tree22788adf31a03cc234b6deeef64e143b7b0d8950 /MdeModulePkg
parent5559a41aad06da01e4f2219e9a4edb123d2a03d3 (diff)
MdeModulePkg PiSmmCore: Fix a bug in SmmLoadImage() in PiSmmCore that in-correct status codes may be returned.
Signed-off-by: Sun Rui <rui.sun@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13208 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Core/PiSmmCore/Dispatcher.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/MdeModulePkg/Core/PiSmmCore/Dispatcher.c b/MdeModulePkg/Core/PiSmmCore/Dispatcher.c
index 833df5b29..651fe88c1 100644
--- a/MdeModulePkg/Core/PiSmmCore/Dispatcher.c
+++ b/MdeModulePkg/Core/PiSmmCore/Dispatcher.c
@@ -27,7 +27,7 @@
Depex - Dependency Expresion.
- Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
distribution. The full text of the license may be found at
@@ -406,7 +406,7 @@ SmmLoadImage (
if (EFI_ERROR (Status)) {
if (Buffer != NULL) {
- Status = gBS->FreePool (Buffer);
+ gBS->FreePool (Buffer);
}
return Status;
}
@@ -423,7 +423,7 @@ SmmLoadImage (
Status = PeCoffLoaderGetImageInfo (&ImageContext);
if (EFI_ERROR (Status)) {
if (Buffer != NULL) {
- Status = gBS->FreePool (Buffer);
+ gBS->FreePool (Buffer);
}
return Status;
}
@@ -459,7 +459,7 @@ SmmLoadImage (
);
if (EFI_ERROR (Status)) {
if (Buffer != NULL) {
- Status = gBS->FreePool (Buffer);
+ gBS->FreePool (Buffer);
}
return Status;
}
@@ -477,7 +477,7 @@ SmmLoadImage (
);
if (EFI_ERROR (Status)) {
if (Buffer != NULL) {
- Status = gBS->FreePool (Buffer);
+ gBS->FreePool (Buffer);
}
return Status;
}
@@ -496,7 +496,7 @@ SmmLoadImage (
Status = PeCoffLoaderLoadImage (&ImageContext);
if (EFI_ERROR (Status)) {
if (Buffer != NULL) {
- Status = gBS->FreePool (Buffer);
+ gBS->FreePool (Buffer);
}
SmmFreePages (DstBuffer, PageCount);
return Status;
@@ -508,7 +508,7 @@ SmmLoadImage (
Status = PeCoffLoaderRelocateImage (&ImageContext);
if (EFI_ERROR (Status)) {
if (Buffer != NULL) {
- Status = gBS->FreePool (Buffer);
+ gBS->FreePool (Buffer);
}
SmmFreePages (DstBuffer, PageCount);
return Status;
@@ -532,7 +532,7 @@ SmmLoadImage (
Status = gBS->AllocatePool (EfiBootServicesData, sizeof (EFI_LOADED_IMAGE_PROTOCOL), (VOID **)&DriverEntry->LoadedImage);
if (EFI_ERROR (Status)) {
if (Buffer != NULL) {
- Status = gBS->FreePool (Buffer);
+ gBS->FreePool (Buffer);
}
SmmFreePages (DstBuffer, PageCount);
return Status;
@@ -553,7 +553,7 @@ SmmLoadImage (
Status = gBS->AllocatePool (EfiBootServicesData, GetDevicePathSize (FilePath), (VOID **)&DriverEntry->LoadedImage->FilePath);
if (EFI_ERROR (Status)) {
if (Buffer != NULL) {
- Status = gBS->FreePool (Buffer);
+ gBS->FreePool (Buffer);
}
SmmFreePages (DstBuffer, PageCount);
return Status;