summaryrefslogtreecommitdiff
path: root/StdLib/BsdSocketLib/close.c
diff options
context:
space:
mode:
Diffstat (limited to 'StdLib/BsdSocketLib/close.c')
-rw-r--r--StdLib/BsdSocketLib/close.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/StdLib/BsdSocketLib/close.c b/StdLib/BsdSocketLib/close.c
index f3f7e98cba..01eb48ecb5 100644
--- a/StdLib/BsdSocketLib/close.c
+++ b/StdLib/BsdSocketLib/close.c
@@ -31,7 +31,6 @@ BslSocketCloseWork (
IN int * pErrno
)
{
- EFI_SERVICE_BINDING_PROTOCOL * pServiceBinding;
EFI_STATUS Status;
//
@@ -50,21 +49,9 @@ BslSocketCloseWork (
}
if ( !EFI_ERROR ( Status )) {
//
- // Locate the socket protocol
+ // Release the socket resources
//
- Status = gBS->LocateProtocol ( &gEfiSocketServiceBindingProtocolGuid,
- NULL,
- (VOID **) &pServiceBinding );
- if ( !EFI_ERROR ( Status )) {
- //
- // Release the handle
- //
- Status = pServiceBinding->DestroyChild ( pServiceBinding,
- pSocketProtocol->SocketHandle );
- }
- if ( EFI_ERROR ( Status )) {
- *pErrno = EIO;
- }
+ *pErrno = EslServiceFreeProtocol ( pSocketProtocol );
}
else {
DEBUG (( DEBUG_ERROR,