From: Yao Jiewen Date: Fri, 25 Dec 2015 01:46:02 +0000 (+0000) Subject: ShellPkg: Fix memory leak in function'ShellCommandConsistMappingInitialize'. X-Git-Tag: edk2-stable201903~8131 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=990046ca4210ae99fabb1814cdd42d2bba3b5c21;hp=c8cfd83ae8fc3ea581a78306bc7f15e3946e6e6b ShellPkg: Fix memory leak in function'ShellCommandConsistMappingInitialize'. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yao Jiewen Reviewed-by: Qiu Shumin Reviewed-by: Ruiyu Ni git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19528 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/ShellPkg/Library/UefiShellCommandLib/ConsistMapping.c b/ShellPkg/Library/UefiShellCommandLib/ConsistMapping.c index 86e8dc59a8..41754dd905 100644 --- a/ShellPkg/Library/UefiShellCommandLib/ConsistMapping.c +++ b/ShellPkg/Library/UefiShellCommandLib/ConsistMapping.c @@ -1401,6 +1401,7 @@ ShellCommandConsistMappingInitialize ( (VOID **)&SimpleFileSystem ); if (EFI_ERROR(Status)) { + FreePool (HIDevicePath); continue; } }