ShellPkg: Fix memory leak in 'InternalShellExecuteDevicePath'.

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
This commit is contained in:
Yao Jiewen 2015-12-24 08:36:45 +00:00 committed by shenshushi
parent 594e780bb9
commit a5bc2ff8c9
1 changed files with 1 additions and 0 deletions

View File

@ -1468,6 +1468,7 @@ InternalShellExecuteDevicePath(
if (NewHandle != NULL) { if (NewHandle != NULL) {
gBS->UnloadImage(NewHandle); gBS->UnloadImage(NewHandle);
} }
FreePool (NewCmdLine);
return (Status); return (Status);
} }
Status = gBS->OpenProtocol( Status = gBS->OpenProtocol(