From 74760c96bea1bab2d1c4d5aceeef7130eda69880 Mon Sep 17 00:00:00 2001 From: Jaben Carsey Date: Thu, 23 Apr 2015 20:28:36 +0000 Subject: [PATCH] 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 Reviewed-by: Qiu Shumin git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17199 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Library/UefiShellLevel3CommandsLib/Help.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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.
+ Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.
Copyright (c) 2014, ARM Limited. All rights reserved.
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.
@@ -97,6 +97,8 @@ PrintDynamicCommandHelp( } } + SHELL_FREE_NON_NULL(CommandHandleList); + return (Found ? EFI_SUCCESS : Status); } -- 2.39.2