diff options
author | Qiu Shumin <shumin.qiu@intel.com> | 2015-12-25 02:12:50 +0000 |
---|---|---|
committer | hwu1225 <hwu1225@Edk2> | 2015-12-25 02:12:50 +0000 |
commit | c1d5a11d81519ab78b9e13d171f87effc4653f8b (patch) | |
tree | 5a5ccf1c2274e2b03fa13710ede88e3e0b37b650 /ShellPkg/Application | |
parent | 210d155761f4e83df3d30bc3ddb5b9998ea71e7c (diff) | |
download | edk2-platforms-c1d5a11d81519ab78b9e13d171f87effc4653f8b.tar.xz |
ShellPkg: Fix the TAB-auto-completion memory leak.
(Sync patch r19522 from main trunk.)
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/branches/UDK2015@19534 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Application')
-rw-r--r-- | ShellPkg/Application/Shell/Shell.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ShellPkg/Application/Shell/Shell.c b/ShellPkg/Application/Shell/Shell.c index 465f4f3974..40ae68d5a8 100644 --- a/ShellPkg/Application/Shell/Shell.c +++ b/ShellPkg/Application/Shell/Shell.c @@ -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;
}
|