Fixed close for socket to properly release the socket context structure and the handle.
Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13802 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user