ShellPkg: Fix memory leak in 'InternalShellExecuteDevicePath'.
authorYao Jiewen <Jiewen.Yao@intel.com>
Thu, 24 Dec 2015 08:36:45 +0000 (08:36 +0000)
committershenshushi <shenshushi@Edk2>
Thu, 24 Dec 2015 08:36:45 +0000 (08:36 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yao Jiewen <Jiewen.Yao@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19523 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Application/Shell/ShellProtocol.c

index 2ddb64d8c7d69a18cd5730925f59ebd7b6743ce7..a6bf9c29b4f6a8c590d8199d99701bbeb996d8a2 100644 (file)
@@ -1468,6 +1468,7 @@ InternalShellExecuteDevicePath(
     if (NewHandle != NULL) {\r
       gBS->UnloadImage(NewHandle);\r
     }\r
+    FreePool (NewCmdLine);\r
     return (Status);\r
   }\r
   Status = gBS->OpenProtocol(\r