Revision: 19537
http://sourceforge.net/p/edk2/code/19537
Author: hwu1225
Date: 2015-12-25 02:14:05 +0000 (Fri, 25 Dec 2015)
Log Message:
-----------
Subject: [PATCH 5/9] ShellPkg: Fix memory leak in
function'ManBufferFindSections'.
(Sync patch r19525 from main trunk.)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <[email protected]>
Reviewed-by: Yao Jiewen <[email protected]>
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/19525
Modified Paths:
--------------
branches/UDK2015/ShellPkg/Application/Shell/ShellManParser.c
Modified: branches/UDK2015/ShellPkg/Application/Shell/ShellManParser.c
===================================================================
--- branches/UDK2015/ShellPkg/Application/Shell/ShellManParser.c
2015-12-25 02:13:44 UTC (rev 19536)
+++ branches/UDK2015/ShellPkg/Application/Shell/ShellManParser.c
2015-12-25 02:14:05 UTC (rev 19537)
@@ -196,6 +196,7 @@
SectionLen = StrLen(SectionName);
SectionName = StrStr(Sections, SectionName);
if (SectionName == NULL) {
+ SHELL_FREE_NON_NULL(TempString);
continue;
}
if (*(SectionName + SectionLen) == CHAR_NULL || *(SectionName +
SectionLen) == L',') {
@@ -231,6 +232,7 @@
}
SHELL_FREE_NON_NULL(TempString);
}
+ SHELL_FREE_NON_NULL(TempString);
if (!Found && !EFI_ERROR(Status)) {
return (EFI_NOT_FOUND);
}
------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits