diff options
author | lpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-10-08 21:39:35 +0000 |
---|---|---|
committer | lpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-10-08 21:39:35 +0000 |
commit | 4652be0c5a106d0604c2d3274803fc0f844b0433 (patch) | |
tree | be8f424d6afb3baad4753ed03d4ec3f8234a6dcb /StdLib/BsdSocketLib | |
parent | e06a4cd134064590aa1a855ff4b973023279e805 (diff) | |
download | edk2-platforms-4652be0c5a106d0604c2d3274803fc0f844b0433.tar.xz |
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
Diffstat (limited to 'StdLib/BsdSocketLib')
-rw-r--r-- | StdLib/BsdSocketLib/close.c | 17 |
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,
|