]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.c
1. Sync the latest network stack. Add NetLibCreateIPv4DPathNode () in netlib library.
[mirror_edk2.git] / MdeModulePkg / Library / DxeUdpIoLib / DxeUdpIoLib.c
index 84bc295bb14bc139a60853f2abfb8a92d62a63cf..b66348c284c9c7401e5f725c99c52fc7cd79cc5e 100644 (file)
@@ -287,7 +287,7 @@ UdpIoCreatePort (
   Status = gBS->OpenProtocol (\r
                   UdpIo->UdpHandle,\r
                   &gEfiUdp4ProtocolGuid,\r
-                  &UdpIo->Udp,\r
+                  (VOID **) &UdpIo->Udp,\r
                   Image,\r
                   Controller,\r
                   EFI_OPEN_PROTOCOL_BY_DRIVER\r
@@ -414,7 +414,10 @@ UdpIoFreePort (
     UdpIo->UdpHandle\r
     );\r
 \r
-  NetListRemoveEntry (&UdpIo->Link);\r
+  if (!IsListEmpty(&UdpIo->Link)) {\r
+    NetListRemoveEntry (&UdpIo->Link);\r
+  }\r
+\r
   NetFreePool (UdpIo);\r
   return EFI_SUCCESS;\r
 }\r