summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/TcpDxe/SockImpl.c
diff options
context:
space:
mode:
Diffstat (limited to 'NetworkPkg/TcpDxe/SockImpl.c')
-rw-r--r--NetworkPkg/TcpDxe/SockImpl.c56
1 files changed, 1 insertions, 55 deletions
diff --git a/NetworkPkg/TcpDxe/SockImpl.c b/NetworkPkg/TcpDxe/SockImpl.c
index 4eb42fb868..c5fb176255 100644
--- a/NetworkPkg/TcpDxe/SockImpl.c
+++ b/NetworkPkg/TcpDxe/SockImpl.c
@@ -1,7 +1,7 @@
/** @file
Implementation of the Socket.
- Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2017, 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
@@ -828,16 +828,8 @@ SockDestroy (
IN OUT SOCKET *Sock
)
{
- VOID *SockProtocol;
- EFI_GUID *TcpProtocolGuid;
- EFI_STATUS Status;
-
ASSERT (SockStream == Sock->Type);
- if (Sock->DestroyCallback != NULL) {
- Sock->DestroyCallback (Sock, Sock->Context);
- }
-
//
// Flush the completion token buffered
// by sock and rcv, snd buffer
@@ -872,52 +864,6 @@ SockDestroy (
Sock->Parent = NULL;
}
- //
- // Set the protocol guid and driver binding handle
- // in the light of Sock->SockType
- //
- if (Sock->IpVersion == IP_VERSION_4) {
- TcpProtocolGuid = &gEfiTcp4ProtocolGuid;
- } else {
- TcpProtocolGuid = &gEfiTcp6ProtocolGuid;
- }
-
- //
- // Retrieve the protocol installed on this sock
- //
- Status = gBS->OpenProtocol (
- Sock->SockHandle,
- TcpProtocolGuid,
- &SockProtocol,
- Sock->DriverBinding,
- Sock->SockHandle,
- EFI_OPEN_PROTOCOL_GET_PROTOCOL
- );
-
- if (EFI_ERROR (Status)) {
-
- DEBUG (
- (EFI_D_ERROR,
- "SockDestroy: Open protocol installed on socket failed with %r\n",
- Status)
- );
-
- goto FreeSock;
- }
-
- //
- // Uninstall the protocol installed on this sock
- // in the light of Sock->SockType
- //
- gBS->UninstallMultipleProtocolInterfaces (
- Sock->SockHandle,
- TcpProtocolGuid,
- SockProtocol,
- NULL
- );
-
-FreeSock:
-
FreePool (Sock);
}