Revision: 19526
http://sourceforge.net/p/edk2/code/19526
Author: shenshushi
Date: 2015-12-25 01:33:53 +0000 (Fri, 25 Dec 2015)
Log Message:
-----------
ShellPkg: Fix memory leak in function'ShellCommandRunHelp'.
When run help command Shell may have memory leak. This patch fix this bug.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yao Jiewen <[email protected]>
Reviewed-by: Qiu Shumin <[email protected]>
Modified Paths:
--------------
trunk/edk2/ShellPkg/Library/UefiShellLevel3CommandsLib/Help.c
Modified: trunk/edk2/ShellPkg/Library/UefiShellLevel3CommandsLib/Help.c
===================================================================
--- trunk/edk2/ShellPkg/Library/UefiShellLevel3CommandsLib/Help.c
2015-12-25 01:29:38 UTC (rev 19525)
+++ trunk/edk2/ShellPkg/Library/UefiShellLevel3CommandsLib/Help.c
2015-12-25 01:33:53 UTC (rev 19526)
@@ -311,6 +311,7 @@
ShellStatus = SHELL_SUCCESS;
CommandToGetHelpOn = NULL;
SectionToGetHelpOn = NULL;
+ SortedCommandList = NULL;
Found = FALSE;
//
@@ -471,6 +472,7 @@
if (SectionToGetHelpOn != NULL) {
FreePool(SectionToGetHelpOn);
}
+ SHELL_FREE_NON_NULL(SortedCommandList);
return (ShellStatus);
}
------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits