From: Wu Jiaxin Date: Thu, 18 Jun 2015 00:48:35 +0000 (+0000) Subject: MdeModulePkg: Fix DHCP4 driver hang issue in some case. X-Git-Tag: edk2-stable201903~9614 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=35bc88dddc79103e6ab8d87932b4e877582a2bc5 MdeModulePkg: Fix DHCP4 driver hang issue in some case. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin Reviewed-by: Ye Ting Reviewed-by: Fu Siyuan git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17653 6f19259b-4bc3-4df7-8a09-765794883524 --- 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.
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
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);