Revision: 15095
          http://sourceforge.net/p/edk2/code/15095
Author:   jcarsey
Date:     2014-01-10 16:42:45 +0000 (Fri, 10 Jan 2014)
Log Message:
-----------
ShellPkg: remove potential memory leak with new apps on old shell

This pointer never gets free when running new apps on the old shell.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <[email protected]>
Reviewed-by: Ruiyu Ni <[email protected]>

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

Modified: trunk/edk2/ShellPkg/Library/UefiShellLib/UefiShellLib.c
===================================================================
--- trunk/edk2/ShellPkg/Library/UefiShellLib/UefiShellLib.c     2014-01-10 
16:41:54 UTC (rev 15094)
+++ trunk/edk2/ShellPkg/Library/UefiShellLib/UefiShellLib.c     2014-01-10 
16:42:45 UTC (rev 15095)
@@ -1,7 +1,7 @@
 /** @file
   Provides interface to shell functionality for shell commands and 
applications.
 
-  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD 
License
   which accompanies this distribution.  The full text of the license may be 
found at
@@ -1598,6 +1598,7 @@
       FreePool(((EFI_SHELL_FILE_INFO_NO_CONST*)Node)->Info);
       FreePool((EFI_SHELL_FILE_INFO_NO_CONST*)Node);
     }
+    SHELL_FREE_NON_NULL(*ListHead);
     return EFI_SUCCESS;
   }
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to