]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: Remove memory leak when printing help and there are dynamic commands installed
authorJaben Carsey <jaben.carsey@intel.com>
Thu, 23 Apr 2015 20:28:36 +0000 (20:28 +0000)
committerjcarsey <jcarsey@Edk2>
Thu, 23 Apr 2015 20:28:36 +0000 (20:28 +0000)
The list of handles needs to be freed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17199 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Library/UefiShellLevel3CommandsLib/Help.c

index e816e0b2e4fba3a57c058ff920a2860f388fef23..aa315a0dfe68e084fdb9f9558c60013c15345f53 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for Help shell level 3 function.\r
 \r
-  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved. <BR>\r
+  Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved. <BR>\r
   Copyright (c) 2014, ARM Limited. All rights reserved. <BR>\r
   (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
 \r
@@ -97,6 +97,8 @@ PrintDynamicCommandHelp(
     }\r
   }\r
 \r
+  SHELL_FREE_NON_NULL(CommandHandleList);\r
+\r
   return (Found ? EFI_SUCCESS : Status);\r
 \r
 }\r