Reviewed-by: Eric Dong <[email protected]>
> -----Original Message----- > From: edk2-devel [mailto:[email protected]] On Behalf Of Ruiyu > Ni > Sent: Thursday, July 28, 2016 12:47 PM > To: [email protected] > Cc: Dong, Eric > Subject: [edk2] [PATCH] 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 <[email protected]> > Cc: Eric Dong <[email protected]> > --- > ShellPkg/Application/Shell/Shell.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ShellPkg/Application/Shell/Shell.c > b/ShellPkg/Application/Shell/Shell.c > index 0f1fb9c..3080a16 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;); > } > > -- > 2.9.0.windows.1 > > _______________________________________________ > edk2-devel mailing list > [email protected] > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

