diff options
author | Cinnamon Shia <cinnamon.shia@hpe.com> | 2016-03-28 11:03:23 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-07-13 20:42:47 +0800 |
commit | 0b6a86091c49bbd21470e39cc7ff7983c20ff8a9 (patch) | |
tree | 83a9282b04955f33a1e32445e94c098bf7166b35 /ShellPkg/Library/UefiDpLib | |
parent | 68d9cf538c8855038edaea76372d9210f89dd809 (diff) | |
download | edk2-0b6a86091c49bbd21470e39cc7ff7983c20ff8a9.tar.gz edk2-0b6a86091c49bbd21470e39cc7ff7983c20ff8a9.tar.bz2 edk2-0b6a86091c49bbd21470e39cc7ff7983c20ff8a9.zip |
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 <cinnamon.shia@hpe.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
(cherry picked from commit 3751a092b67f2d3481fa2295cb45a0afda6a9118)
Diffstat (limited to 'ShellPkg/Library/UefiDpLib')
-rw-r--r-- | ShellPkg/Library/UefiDpLib/Dp.c | 3 |
1 files changed, 3 insertions, 0 deletions
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);
|