Revision: 19539
          http://sourceforge.net/p/edk2/code/19539
Author:   hwu1225
Date:     2015-12-25 02:14:50 +0000 (Fri, 25 Dec 2015)
Log Message:
-----------
ShellPkg: Fix memory leak in function 
'ShellCommandCreateInitialMappingsAndPaths'.

(Sync patch r19527 from main trunk.)

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]>

Revision Links:
--------------
    http://sourceforge.net/p/edk2/code/19527

Modified Paths:
--------------
    branches/UDK2015/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c

Modified: 
branches/UDK2015/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
===================================================================
--- branches/UDK2015/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c 
2015-12-25 02:14:27 UTC (rev 19538)
+++ branches/UDK2015/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c 
2015-12-25 02:14:50 UTC (rev 19539)
@@ -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