From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mx.groups.io with SMTP id smtpd.web10.24752.1629940882400848476 for ; Wed, 25 Aug 2021 18:21:24 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: huawei.com, ip: 45.249.212.255, mailfrom: xiewenyi2@huawei.com) Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Gw4mF1zFlz19Vcj for ; Thu, 26 Aug 2021 09:20:45 +0800 (CST) Received: from dggpemm000003.china.huawei.com (7.185.36.128) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 26 Aug 2021 09:21:08 +0800 Received: from HGH1000039998.huawei.com (10.184.68.188) by dggpemm000003.china.huawei.com (7.185.36.128) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 26 Aug 2021 09:21:08 +0800 From: "wenyi,xie" To: , , , , CC: , Subject: [PATCH EDK2 v1 1/1] MdeModulePkg/HiiDatabaseDxe:remove dead code block Date: Thu, 26 Aug 2021 09:16:03 +0800 Message-ID: <1629940563-82195-2-git-send-email-xiewenyi2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1629940563-82195-1-git-send-email-xiewenyi2@huawei.com> References: <1629940563-82195-1-git-send-email-xiewenyi2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.184.68.188] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm000003.china.huawei.com (7.185.36.128) X-CFilter-Loop: Reflected Content-Type: text/plain As the if statement outside has confirmed that BlockData->Name == NULL, so the if statement inside is always false. Cc: Jian J Wang Cc: Hao A Wu Cc: Dandan Bi Cc: Eric Dong Signed-off-by: Wenyi Xie --- MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c index d492b769d51c..17a914208c6d 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; } -- 2.20.1.windows.1