mirror of
https://github.com/reactos/reactos.git
synced 2024-10-20 16:06:27 +00:00
[IP]
- Fix a small locking issue in TCPClose svn path=/branches/aicom-network-branch/; revision=44845
This commit is contained in:
parent
8dd3966ba9
commit
fb4eec0d30
|
@ -731,25 +731,27 @@ NTSTATUS TCPClose
|
|||
* closure anymore but we still need it to determine
|
||||
* if we caused the closure
|
||||
*/
|
||||
LockObject(Connection, &OldIrql);
|
||||
Socket = Connection->SocketContext;
|
||||
Connection->SocketContext = NULL;
|
||||
|
||||
/* We need to close here otherwise oskit will never indicate
|
||||
* SEL_FIN and we will never fully close the connection
|
||||
*/
|
||||
LockObject(Connection, &OldIrql);
|
||||
Status = TCPTranslateError( OskitTCPClose( Socket ) );
|
||||
UnlockObject(Connection, OldIrql);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
Connection->SocketContext = Socket;
|
||||
UnlockObject(Connection, OldIrql);
|
||||
return Status;
|
||||
}
|
||||
|
||||
if (Connection->AddressFile)
|
||||
DereferenceObject(Connection->AddressFile);
|
||||
|
||||
UnlockObject(Connection, OldIrql);
|
||||
|
||||
DereferenceObject(Connection);
|
||||
|
||||
return Status;
|
||||
|
|
Loading…
Reference in a new issue