MdeModulePkg/Dxe/Image: Restore mCurrentImage on all paths

This commit makes sure that in function CoreStartImage(), module
variable 'mCurrentImage' is restored to the current start image context
on all code paths.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Hao Wu 2017-03-20 16:24:09 +08:00
parent 36a0d5cab8
commit 7a14d54f6c
1 changed files with 6 additions and 0 deletions

View File

@ -1647,6 +1647,12 @@ CoreStartImage (
// //
PERF_START (NULL, "StartImage:", NULL, Tick); PERF_START (NULL, "StartImage:", NULL, Tick);
PERF_END (NULL, "StartImage:", NULL, 0); PERF_END (NULL, "StartImage:", NULL, 0);
//
// Pop the current start image context
//
mCurrentImage = LastImage;
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
Image->JumpContext = ALIGN_POINTER (Image->JumpBuffer, BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT); Image->JumpContext = ALIGN_POINTER (Image->JumpBuffer, BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT);