From: Yao Jiewen Date: Thu, 24 Dec 2015 08:36:45 +0000 (+0000) Subject: ShellPkg: Fix memory leak in 'InternalShellExecuteDevicePath'. X-Git-Tag: edk2-stable201903~8136 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=a5bc2ff8c9b8feeb6fb77cd1c840005c0316ccf4 ShellPkg: Fix memory leak in 'InternalShellExecuteDevicePath'. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yao Jiewen Reviewed-by: Qiu Shumin git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19523 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/ShellPkg/Application/Shell/ShellProtocol.c b/ShellPkg/Application/Shell/ShellProtocol.c index 2ddb64d8c7..a6bf9c29b4 100644 --- a/ShellPkg/Application/Shell/ShellProtocol.c +++ b/ShellPkg/Application/Shell/ShellProtocol.c @@ -1468,6 +1468,7 @@ InternalShellExecuteDevicePath( if (NewHandle != NULL) { gBS->UnloadImage(NewHandle); } + FreePool (NewCmdLine); return (Status); } Status = gBS->OpenProtocol(