Revision: 19527
          http://sourceforge.net/p/edk2/code/19527
Author:   shenshushi
Date:     2015-12-25 01:41:38 +0000 (Fri, 25 Dec 2015)
Log Message:
-----------
ShellPkg: Fix memory leak in function 
'ShellCommandCreateInitialMappingsAndPaths'.

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

Modified Paths:
--------------
    trunk/edk2/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c

Modified: trunk/edk2/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
===================================================================
--- trunk/edk2/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c       
2015-12-25 01:33:53 UTC (rev 19526)
+++ trunk/edk2/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c       
2015-12-25 01:41:38 UTC (rev 19527)
@@ -1261,6 +1261,9 @@
         ; MapListNode = (SHELL_MAP_LIST *)GetFirstNode(&gShellMapList.Link)
        ){
           RemoveEntryList(&MapListNode->Link);
+          SHELL_FREE_NON_NULL(MapListNode->DevicePath);
+          SHELL_FREE_NON_NULL(MapListNode->MapName);
+          SHELL_FREE_NON_NULL(MapListNode->CurrentDirectoryPath);
           FreePool(MapListNode);
     } // for loop
   }


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to