X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=StdLib%2FBsdSocketLib%2Fclose.c;h=01eb48ecb58991a0f298eeaff86184532489ff27;hb=2da3e96cb7aa4510f5b5086efca0c2188c055751;hp=f3f7e98cbace304c08678cfa70293799f5eb2df2;hpb=7700f0f5c0ab90bf052e33fa0ddd2f2aa7e7893e;p=mirror_edk2.git 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,