summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorxdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524>2010-08-12 04:46:11 +0000
committerxdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524>2010-08-12 04:46:11 +0000
commitae0a0b06af78f698df71b18a1defb5aece2f21b4 (patch)
treea0def64e209da9498d4b1596b387c2bb0f7f945e /MdeModulePkg
parentbab26f79ff3ef901b9d96500ac723d2bd41e3cd0 (diff)
downloadedk2-platforms-ae0a0b06af78f698df71b18a1defb5aece2f21b4.tar.xz
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
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c11
-rw-r--r--MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c3
2 files changed, 8 insertions, 6 deletions
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;
}
}
}