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
This commit is contained in:
Jaben Carsey 2015-04-23 20:28:36 +00:00 committed by jcarsey
parent 2a0473573e
commit 74760c96be
1 changed files with 3 additions and 1 deletions

View File

@ -1,7 +1,7 @@
/** @file /** @file
Main file for Help shell level 3 function. 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> Copyright (c) 2014, ARM Limited. All rights reserved. <BR>
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<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); return (Found ? EFI_SUCCESS : Status);
} }