summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c
index fb83784da9..fcd3ccb9fd 100644
--- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c
+++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c
@@ -393,6 +393,15 @@ Ip4CleanService (
{
EFI_STATUS Status;
+ IpSb->State = IP4_SERVICE_DESTROY;
+
+ if (IpSb->Timer != NULL) {
+ gBS->SetTimer (IpSb->Timer, TimerCancel, 0);
+ gBS->CloseEvent (IpSb->Timer);
+
+ IpSb->Timer = NULL;
+ }
+
if (IpSb->DefaultInterface != NULL) {
Status = Ip4FreeInterface (IpSb->DefaultInterface, NULL);
@@ -432,13 +441,6 @@ Ip4CleanService (
IpSb->MnpChildHandle = NULL;
}
- if (IpSb->Timer != NULL) {
- gBS->SetTimer (IpSb->Timer, TimerCancel, 0);
- gBS->CloseEvent (IpSb->Timer);
-
- IpSb->Timer = NULL;
- }
-
if (IpSb->ReconfigEvent != NULL) {
gBS->CloseEvent (IpSb->ReconfigEvent);
@@ -750,8 +752,6 @@ Ip4DriverBindingStop (
} else if (IsListEmpty (&IpSb->Children)) {
State = IpSb->State;
- IpSb->State = IP4_SERVICE_DESTROY;
-
//
// OK, clean other resources then uninstall the service binding protocol.
//