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 09:10:47 +0800 |
commit | df082f757af50994a2c5202236449694b446e16b (patch) | |
tree | 746fff93b72350094ed355ed8b5e29411143bf98 | |
parent | 0b75171b76b517672dd8df7ad57b5daba3875b0c (diff) | |
download | edk2-platforms-df082f757af50994a2c5202236449694b446e16b.tar.xz |
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>
(cherry picked from commit 7a14d54f6c50a1ff73351e4aaee8570ec5f8a476)
-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);
|