From b08b7ba4516f0c7dbe34aa4f9166d41cd9fb4c84 Mon Sep 17 00:00:00 2001 From: rsun3 Date: Tue, 24 Apr 2012 01:38:40 +0000 Subject: MdeModulePkg PiSmmCore: Fix a bug in SmmLoadImage() in PiSmmCore that in-correct status codes may be returned. Signed-off-by: Sun Rui Reviewed-by: Michael D Kinney git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13208 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Core/PiSmmCore/Dispatcher.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'MdeModulePkg') diff --git a/MdeModulePkg/Core/PiSmmCore/Dispatcher.c b/MdeModulePkg/Core/PiSmmCore/Dispatcher.c index 833df5b297..651fe88c10 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.
+ Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.
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; -- cgit v1.2.3