Revision: 19538
http://sourceforge.net/p/edk2/code/19538
Author: hwu1225
Date: 2015-12-25 02:14:27 +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.
(Sync patch r19526 from main trunk.)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yao Jiewen <[email protected]>
Reviewed-by: Qiu Shumin <[email protected]>
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/19526
Modified Paths:
--------------
branches/UDK2015/ShellPkg/Library/UefiShellLevel3CommandsLib/Help.c
Modified: branches/UDK2015/ShellPkg/Library/UefiShellLevel3CommandsLib/Help.c
===================================================================
--- branches/UDK2015/ShellPkg/Library/UefiShellLevel3CommandsLib/Help.c
2015-12-25 02:14:05 UTC (rev 19537)
+++ branches/UDK2015/ShellPkg/Library/UefiShellLevel3CommandsLib/Help.c
2015-12-25 02:14:27 UTC (rev 19538)
@@ -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