Revision: 17653
http://sourceforge.net/p/edk2/code/17653
Author: jiaxinwu
Date: 2015-06-18 00:48:35 +0000 (Thu, 18 Jun 2015)
Log Message:
-----------
MdeModulePkg: Fix DHCP4 driver hang issue in some case.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <[email protected]>
Reviewed-by: Ye Ting <[email protected]>
Reviewed-by: Fu Siyuan <[email protected]>
Modified Paths:
--------------
trunk/edk2/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.c
Modified: trunk/edk2/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.c
===================================================================
--- trunk/edk2/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.c
2015-06-18 00:43:15 UTC (rev 17652)
+++ trunk/edk2/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.c
2015-06-18 00:48:35 UTC (rev 17653)
@@ -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 @@
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);
------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits