summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal
diff options
context:
space:
mode:
authorWu Jiaxin <jiaxin.wu@intel.com>2015-06-18 00:48:35 +0000
committerjiaxinwu <jiaxinwu@Edk2>2015-06-18 00:48:35 +0000
commit35bc88dddc79103e6ab8d87932b4e877582a2bc5 (patch)
treed6b978ce412bb1b85d22b01bd2feeb92b4735253 /MdeModulePkg/Universal
parentce964733292e31dce34e0be651f20a9d79884132 (diff)
downloadedk2-35bc88dddc79103e6ab8d87932b4e877582a2bc5.tar.gz
edk2-35bc88dddc79103e6ab8d87932b4e877582a2bc5.tar.bz2
edk2-35bc88dddc79103e6ab8d87932b4e877582a2bc5.zip
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
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r--MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.c b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.c
index d1bba3022a..9253df2b3f 100644
--- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.c
+++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.c
@@ -1,6 +1,6 @@
/** @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
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
@@ -718,6 +718,19 @@ Dhcp4ServiceBindingDestroyChild (
RemoveEntryList (&Instance->Link);
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);
FreePool (Instance);