Revision: 19525
          http://sourceforge.net/p/edk2/code/19525
Author:   shenshushi
Date:     2015-12-25 01:29:38 +0000 (Fri, 25 Dec 2015)
Log Message:
-----------
Subject: [PATCH 5/9] ShellPkg: Fix memory leak in 
function'ManBufferFindSections'.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <[email protected]>
Reviewed-by: Yao Jiewen <[email protected]>

Modified Paths:
--------------
    trunk/edk2/ShellPkg/Application/Shell/ShellManParser.c

Modified: trunk/edk2/ShellPkg/Application/Shell/ShellManParser.c
===================================================================
--- trunk/edk2/ShellPkg/Application/Shell/ShellManParser.c      2015-12-25 
01:24:16 UTC (rev 19524)
+++ trunk/edk2/ShellPkg/Application/Shell/ShellManParser.c      2015-12-25 
01:29:38 UTC (rev 19525)
@@ -215,6 +215,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',') {
@@ -250,6 +251,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

Reply via email to