summaryrefslogtreecommitdiff
path: root/ShellPkg/Application/Shell/Shell.c
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2016-07-28 12:46:25 +0800
committerHao Wu <hao.a.wu@intel.com>2016-07-29 12:28:12 +0800
commit83adb828a3cbbe92d1650743f360fd20dfdb681f (patch)
tree2ab195d743742cbafff1ba169b8d5b546eb4181b /ShellPkg/Application/Shell/Shell.c
parent3b45cd3b9abacb4ed7d462c13fd11b8965ec51fd (diff)
downloadedk2-platforms-83adb828a3cbbe92d1650743f360fd20dfdb681f.tar.xz
ShellPkg: Unregister hotkey callback when exiting Shell
Commit 9168df3dea65f707d1e9c32eba5e18ef6b84e5cd "ShellPkg/ShellProtocol.c: Handle memory allocation failure" only keeps the protocol clean up in CleanUpShellProtocol() and creates a new function CleanUpShellEnvironment() which calls CleanUpShellProtocol(), then unregisters the hotkey callback. But the commit forgot to change the Shell.c to call CleanUpShellEnvironment() which causes the hotkey callback is not unregistered while the callback function doesn't exist when Shell exits. This causes system hang when pressing CTRL+C after exiting shell. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> (cherry picked from commit 031403460c9782a2563a81a6065ded99046960c2)
Diffstat (limited to 'ShellPkg/Application/Shell/Shell.c')
-rw-r--r--ShellPkg/Application/Shell/Shell.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ShellPkg/Application/Shell/Shell.c b/ShellPkg/Application/Shell/Shell.c
index 0f1fb9c287..3080a1644f 100644
--- a/ShellPkg/Application/Shell/Shell.c
+++ b/ShellPkg/Application/Shell/Shell.c
@@ -667,7 +667,7 @@ FreeResources:
if (ShellInfoObject.NewEfiShellProtocol->IsRootShell()){
InternalEfiShellSetEnv(L"cwd", NULL, TRUE);
}
- CleanUpShellProtocol(ShellInfoObject.NewEfiShellProtocol);
+ CleanUpShellEnvironment (ShellInfoObject.NewEfiShellProtocol);
DEBUG_CODE(ShellInfoObject.NewEfiShellProtocol = NULL;);
}