From 0b6a86091c49bbd21470e39cc7ff7983c20ff8a9 Mon Sep 17 00:00:00 2001 From: Cinnamon Shia Date: Mon, 28 Mar 2016 11:03:23 +0800 Subject: ShellPkg/UefiDpLib: Fix a memory leak issue in Dp. The allocated memory of ParamPackage is not freed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Cinnamon Shia Reviewed-by: Qiu Shumin Reviewed-by: Star Zeng (cherry picked from commit 3751a092b67f2d3481fa2295cb45a0afda6a9118) --- ShellPkg/Library/UefiDpLib/Dp.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ShellPkg') diff --git a/ShellPkg/Library/UefiDpLib/Dp.c b/ShellPkg/Library/UefiDpLib/Dp.c index 0176e31bc0..54fd0d1ae1 100644 --- a/ShellPkg/Library/UefiDpLib/Dp.c +++ b/ShellPkg/Library/UefiDpLib/Dp.c @@ -386,6 +386,9 @@ ShellCommandRunDp ( } Done: + if (ParamPackage != NULL) { + ShellCommandLineFreeVarList (ParamPackage); + } SHELL_FREE_NON_NULL (StringPtr); if (CustomCumulativeData != NULL) { SHELL_FREE_NON_NULL (CustomCumulativeData->Name); -- cgit v1.2.3