MdeModulePkg: Fix DHCP4 driver hang issue in some case.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17653 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
ce96473329
commit
35bc88dddc
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -718,6 +718,19 @@ Dhcp4ServiceBindingDestroyChild (
|
|||||||
RemoveEntryList (&Instance->Link);
|
RemoveEntryList (&Instance->Link);
|
||||||
DhcpSb->NumChildren--;
|
DhcpSb->NumChildren--;
|
||||||
|
|
||||||
|
if (Instance->UdpIo != NULL) {
|
||||||
|
UdpIoCleanIo (Instance->UdpIo);
|
||||||
|
gBS->CloseProtocol (
|
||||||
|
Instance->UdpIo->UdpHandle,
|
||||||
|
&gEfiUdp4ProtocolGuid,
|
||||||
|
Instance->Service->Image,
|
||||||
|
Instance->Handle
|
||||||
|
);
|
||||||
|
UdpIoFreeIo (Instance->UdpIo);
|
||||||
|
Instance->UdpIo = NULL;
|
||||||
|
Instance->Token = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
gBS->RestoreTPL (OldTpl);
|
gBS->RestoreTPL (OldTpl);
|
||||||
|
|
||||||
FreePool (Instance);
|
FreePool (Instance);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user