Reviewed-by: Qiu Shumin <[email protected]>

-----Original Message-----
From: edk2-devel [mailto:[email protected]] On Behalf Of Cinnamon 
Shia
Sent: Monday, March 28, 2016 11:03 AM
To: [email protected]
Cc: Carsey, Jaben; [email protected]; Qiu, Shumin; Zeng, Star
Subject: [edk2] [PATCH 2/2] 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 <[email protected]>
---
 ShellPkg/Library/UefiDpLib/Dp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ShellPkg/Library/UefiDpLib/Dp.c b/ShellPkg/Library/UefiDpLib/Dp.c 
index 0176e31..54fd0d1 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);
--
2.7.1.windows.2

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to