mirror of https://github.com/acidanthera/audk.git
ShellPkg: Fix the TAB-auto-completion memory leak.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19522 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
14810d6b64
commit
594e780bb9
|
@ -1205,6 +1205,7 @@ DoShellPrompt (
|
|||
CONST CHAR16 *CurDir;
|
||||
UINTN BufferSize;
|
||||
EFI_STATUS Status;
|
||||
LIST_ENTRY OldBufferList;
|
||||
|
||||
CurDir = NULL;
|
||||
|
||||
|
@ -1218,6 +1219,7 @@ DoShellPrompt (
|
|||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
SaveBufferList(&OldBufferList);
|
||||
CurDir = ShellInfoObject.NewEfiShellProtocol->GetEnv(L"cwd");
|
||||
|
||||
//
|
||||
|
@ -1247,6 +1249,7 @@ DoShellPrompt (
|
|||
//
|
||||
// Done with this command
|
||||
//
|
||||
RestoreBufferList(&OldBufferList);
|
||||
FreePool (CmdLine);
|
||||
return Status;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue