ShellPkg: Correct 3 places where memory was not being properly released by the shell.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
Reviewed-by: Liu, Jiang A <jiang.a.liu@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13938 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jcarsey
2012-11-13 16:08:52 +00:00
parent bad7344668
commit 3f869579a4
3 changed files with 8 additions and 5 deletions

View File

@ -192,6 +192,7 @@ ParseCommandLineToArgs(
//
(*Argv) = AllocateZeroPool((Count)*sizeof(CHAR16*));
if (*Argv == NULL) {
SHELL_FREE_NON_NULL(TempParameter);
return (EFI_OUT_OF_RESOURCES);
}
@ -207,6 +208,7 @@ ParseCommandLineToArgs(
(*Argc)++;
}
ASSERT(Count >= (*Argc));
SHELL_FREE_NON_NULL(TempParameter);
return (EFI_SUCCESS);
}