summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MdeModulePkg/Library/GenericBdsLib/BdsConsole.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/MdeModulePkg/Library/GenericBdsLib/BdsConsole.c b/MdeModulePkg/Library/GenericBdsLib/BdsConsole.c
index 3d7758d790..f826e6d95c 100644
--- a/MdeModulePkg/Library/GenericBdsLib/BdsConsole.c
+++ b/MdeModulePkg/Library/GenericBdsLib/BdsConsole.c
@@ -757,9 +757,8 @@ EnableQuietBoot (
&Width
);
if (EFI_ERROR (Status)) {
- if (ImageData != NULL) {
- FreePool (ImageData);
- }
+ FreePool (ImageData);
+
if (Badging == NULL) {
return Status;
} else {
@@ -854,9 +853,8 @@ EnableQuietBoot (
}
}
- if (ImageData != NULL) {
- FreePool (ImageData);
- }
+ FreePool (ImageData);
+
if (Blt != NULL) {
FreePool (Blt);
}