diff options
author | Hao Wu <hao.a.wu@intel.com> | 2017-03-20 16:24:09 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2017-04-13 08:51:53 +0800 |
commit | 7a14d54f6c50a1ff73351e4aaee8570ec5f8a476 (patch) | |
tree | 0a65ca6e5c4e9dcc17c09ec3a91d67d483b02b0a /MdeModulePkg/Core/Dxe/Image/Image.c | |
parent | 36a0d5cab8c9a6ad628ca8e6ccb5d63ed87a53dd (diff) | |
download | edk2-7a14d54f6c50a1ff73351e4aaee8570ec5f8a476.tar.gz edk2-7a14d54f6c50a1ff73351e4aaee8570ec5f8a476.tar.bz2 edk2-7a14d54f6c50a1ff73351e4aaee8570ec5f8a476.zip |
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>
Diffstat (limited to 'MdeModulePkg/Core/Dxe/Image/Image.c')
-rw-r--r-- | MdeModulePkg/Core/Dxe/Image/Image.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c index 93720c85cb..03e979a604 100644 --- a/MdeModulePkg/Core/Dxe/Image/Image.c +++ b/MdeModulePkg/Core/Dxe/Image/Image.c @@ -1647,6 +1647,12 @@ CoreStartImage ( //
PERF_START (NULL, "StartImage:", NULL, Tick);
PERF_END (NULL, "StartImage:", NULL, 0);
+
+ //
+ // Pop the current start image context
+ //
+ mCurrentImage = LastImage;
+
return EFI_OUT_OF_RESOURCES;
}
Image->JumpContext = ALIGN_POINTER (Image->JumpBuffer, BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT);
|