]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellLevel3CommandsLib/Help.c
ShellPkg: Remove memory leak when printing help and there are dynamic commands installed
[mirror_edk2.git] / 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