mirror of https://github.com/acidanthera/audk.git
Set *ImageHandle to NULL when LoadImage() returns EFI_ACCESS_DENIED.
Signed-off-by: niruiyu Reviewed-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11783 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
e9668a606e
commit
31222776db
|
@ -1086,6 +1086,13 @@ CoreLoadImageCommon (
|
|||
OriginalFilePath
|
||||
);
|
||||
if (EFI_ERROR (SecurityStatus) && SecurityStatus != EFI_SECURITY_VIOLATION) {
|
||||
if (SecurityStatus == EFI_ACCESS_DENIED) {
|
||||
//
|
||||
// Image was not loaded because the platform policy prohibits the image from being loaded.
|
||||
// It's the only place we could meet EFI_ACCESS_DENIED.
|
||||
//
|
||||
*ImageHandle = NULL;
|
||||
}
|
||||
Status = SecurityStatus;
|
||||
Image = NULL;
|
||||
goto Done;
|
||||
|
@ -1237,7 +1244,6 @@ Done:
|
|||
if (EFI_ERROR (Status)) {
|
||||
if (Image != NULL) {
|
||||
CoreUnloadAndCloseImage (Image, (BOOLEAN)(DstBuffer == 0));
|
||||
*ImageHandle = NULL;
|
||||
}
|
||||
} else if (EFI_ERROR (SecurityStatus)) {
|
||||
Status = SecurityStatus;
|
||||
|
|
Loading…
Reference in New Issue