From 6478baf891524348451d75a37f4e4692b835a45b Mon Sep 17 00:00:00 2001 From: Wang Fan Date: Tue, 16 Jan 2018 15:57:04 +0800 Subject: [PATCH] MdeModulePkg/DxeIpIoLib: Fixed the error ASSERT incorrectly used in IpIoAddIp(). * In DxeIpIo, an ASSERT check is incorrectly used in IpIoAddIp(), which result debug image hang when this API is called, this patch is to fix this issue. Cc: Jiaxin Wu Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wang Fan Reviewed-by: Jiaxin Wu --- MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c index 0c6681d9d5..66c7fec6c5 100644 --- a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c +++ b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c @@ -1742,12 +1742,12 @@ IpIoAddIp ( EFI_EVENT Event; ASSERT (IpIo != NULL); + ASSERT ((IpIo->IpVersion == IP_VERSION_4) || (IpIo->IpVersion == IP_VERSION_6)); IpInfo = AllocatePool (sizeof (IP_IO_IP_INFO)); if (IpInfo == NULL) { return NULL; } - ASSERT ((IpInfo->IpVersion == IP_VERSION_4) || (IpInfo->IpVersion == IP_VERSION_6)); // // Init this IpInfo, set the Addr and SubnetMask to 0 before we configure the IP -- 2.39.2