summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Library')
-rw-r--r--MdeModulePkg/Library/GenericBdsLib/BdsMisc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c b/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c
index 3136341162..6b3fa618e1 100644
--- a/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c
+++ b/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c
@@ -305,9 +305,7 @@ BdsLibRegisterNewOption (
// Got the option, so just return
//
FreePool (OptionPtr);
- if (TempOptionPtr != NULL) {
- FreePool (TempOptionPtr);
- }
+ FreePool (TempOptionPtr);
return EFI_SUCCESS;
} else {
//