summaryrefslogtreecommitdiff
path: root/ShellPkg/Library
diff options
context:
space:
mode:
authorJaben Carsey <jaben.carsey@intel.com>2015-04-23 20:28:36 +0000
committerjcarsey <jcarsey@Edk2>2015-04-23 20:28:36 +0000
commit74760c96bea1bab2d1c4d5aceeef7130eda69880 (patch)
treee5853bfa075d59cb15c8008188151dd28f27ce39 /ShellPkg/Library
parent2a0473573ee08b1a4d3e9e7a44dfce24d078b99e (diff)
downloadedk2-platforms-74760c96bea1bab2d1c4d5aceeef7130eda69880.tar.xz
ShellPkg: Remove memory leak when printing help and there are dynamic commands installed
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
Diffstat (limited to 'ShellPkg/Library')
-rw-r--r--ShellPkg/Library/UefiShellLevel3CommandsLib/Help.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiShellLevel3CommandsLib/Help.c b/ShellPkg/Library/UefiShellLevel3CommandsLib/Help.c
index e816e0b2e4..aa315a0dfe 100644
--- a/ShellPkg/Library/UefiShellLevel3CommandsLib/Help.c
+++ b/ShellPkg/Library/UefiShellLevel3CommandsLib/Help.c
@@ -1,7 +1,7 @@
/** @file
Main file for Help shell level 3 function.
- Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved. <BR>
+ Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved. <BR>
Copyright (c) 2014, ARM Limited. All rights reserved. <BR>
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
@@ -97,6 +97,8 @@ PrintDynamicCommandHelp(
}
}
+ SHELL_FREE_NON_NULL(CommandHandleList);
+
return (Found ? EFI_SUCCESS : Status);
}