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);