From 5f119dfc9068bed77462b1a00bc4763c861c7deb Mon Sep 17 00:00:00 2001 From: Harry Liebel Date: Fri, 11 Apr 2014 17:35:22 +0000 Subject: [PATCH] ShellPkg: Fix compiler warning 'unused variable' Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Harry Liebel Reviewed-by: Olivier Martin git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15462 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Library/UefiHandleParsingLib/UefiHandleParsingLib.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c index 0cd35b4fd0..6f4dd91cca 100644 --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c @@ -145,6 +145,12 @@ LoadedImageProtocolDumpInformation( EFI_OPEN_PROTOCOL_GET_PROTOCOL ); + if (EFI_ERROR (Status)) { + SHELL_FREE_NON_NULL (Temp); + SHELL_FREE_NON_NULL (RetVal); + return NULL; + } + DataType = ConvertMemoryType(LoadedImage->ImageDataType); CodeType = ConvertMemoryType(LoadedImage->ImageCodeType); -- 2.39.2