From ae0a0b06af78f698df71b18a1defb5aece2f21b4 Mon Sep 17 00:00:00 2001 From: xdu2 Date: Thu, 12 Aug 2010 04:46:11 +0000 Subject: Fix bug in Ip4Dxe and Dhcp4Dxe to ensure that RaiseTPL and RestoreTPL are in pair. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10790 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c | 11 ++++++----- MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c | 3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'MdeModulePkg/Universal/Network') diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c index 3223f8db17..e8e127da48 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c @@ -910,16 +910,17 @@ EfiDhcp4RenewRebind ( if (DhcpSb->DhcpState == Dhcp4Stopped) { Status = EFI_NOT_STARTED; - goto ON_ERROR; + goto ON_EXIT; } if (DhcpSb->DhcpState != Dhcp4Bound) { Status = EFI_ACCESS_DENIED; - goto ON_ERROR; + goto ON_EXIT; } if (DHCP_IS_BOOTP (DhcpSb->Para)) { - return EFI_SUCCESS; + Status = EFI_SUCCESS; + goto ON_EXIT; } // @@ -941,7 +942,7 @@ EfiDhcp4RenewRebind ( if (EFI_ERROR (Status)) { DhcpSetState (DhcpSb, Dhcp4Bound, FALSE); - goto ON_ERROR; + goto ON_EXIT; } DhcpSb->ExtraRefresh = TRUE; @@ -961,7 +962,7 @@ EfiDhcp4RenewRebind ( return EFI_SUCCESS; -ON_ERROR: +ON_EXIT: gBS->RestoreTPL (OldTpl); return Status; } diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c index 37e2114d01..8974f5a5b7 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c @@ -1241,7 +1241,8 @@ EfiIp4Configure ( } if (Current->UseDefaultAddress && IP4_NO_MAPPING (IpInstance)) { - return EFI_NO_MAPPING; + Status = EFI_NO_MAPPING; + goto ON_EXIT; } } } -- cgit v1.2.3