From 1a5b5c85e04c92b8f4d878ae48456e1ba320e603 Mon Sep 17 00:00:00 2001
From: Harry Liebel <Harry.Liebel@arm.com>
Date: Wed, 9 Apr 2014 17:04:29 +0100
Subject: ShellPkg: Fix compiler warning

Return value set but not used caused build to fail.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
---
 ShellPkg/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 0cd35b4..6f4dd91 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);
 
-- 
1.8.5

