summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorWenyi Xie <xiewenyi2@huawei.com>2021-08-26 09:16:03 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-09-02 10:42:59 +0000
commitb6bc203375b6efb6822ee4fe4a59be4f1918436b (patch)
tree43b3bcf5e9d70e36526ae96b0bf938181bdc2b6a /MdeModulePkg
parente3ee8c8dbd7a9f7d7905abe17be60354c9f5f9a3 (diff)
downloadedk2-b6bc203375b6efb6822ee4fe4a59be4f1918436b.tar.gz
edk2-b6bc203375b6efb6822ee4fe4a59be4f1918436b.tar.bz2
edk2-b6bc203375b6efb6822ee4fe4a59be4f1918436b.zip
MdeModulePkg/HiiDatabaseDxe:remove dead code block
As the if statement outside has confirmed that BlockData->Name == NULL, so the if statement inside is always false. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Cc: Eric Dong <eric.dong@intel.com> Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
index d492b769d5..17a914208c 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
@@ -2871,9 +2871,6 @@ ParseIfrData (
//
if ((BlockData->Name == NULL) && ((BlockData->Offset + BlockData->Width) > VarStorageData->Size)) {
Status = EFI_INVALID_PARAMETER;
- if (BlockData->Name != NULL) {
- FreePool (BlockData->Name);
- }
FreePool (BlockData);
goto Done;
}