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:
@@ -68,6 +68,40 @@ CONST EFI_GUID mEslUdp6ServiceGuid __attribute__((weak)) = {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Free the socket resources
|
||||
|
||||
This releases the socket resources allocated by calling
|
||||
EslServiceGetProtocol.
|
||||
|
||||
This routine is called from the ::close routine in BsdSocketLib
|
||||
to release the socket resources.
|
||||
|
||||
@param [in] pSocketProtocol Address of an ::EFI_SOCKET_PROTOCOL
|
||||
structure
|
||||
|
||||
@return Value for ::errno, zero (0) indicates success.
|
||||
|
||||
**/
|
||||
int
|
||||
EslServiceFreeProtocol (
|
||||
IN EFI_SOCKET_PROTOCOL * pSocketProtocol
|
||||
)
|
||||
{
|
||||
int RetVal;
|
||||
|
||||
//
|
||||
// Release the socket resources
|
||||
//
|
||||
EslSocketFree ( pSocketProtocol, &RetVal );
|
||||
|
||||
//
|
||||
// Return the operation status
|
||||
//
|
||||
return RetVal;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Connect to the EFI socket library
|
||||
|
||||
|
Reference in New Issue
Block a user