diff --git a/reactos/drivers/net/tcpip/include/titypes.h b/reactos/drivers/net/tcpip/include/titypes.h index 7bdb24fd426..88be6127689 100644 --- a/reactos/drivers/net/tcpip/include/titypes.h +++ b/reactos/drivers/net/tcpip/include/titypes.h @@ -301,7 +301,6 @@ typedef enum { to this structure */ typedef struct _CONNECTION_ENDPOINT { LIST_ENTRY ListEntry; /* Entry on list */ - LIST_ENTRY AddrFileEntry; /* Entry on address file list */ KSPIN_LOCK Lock; /* Spin lock to protect this structure */ ULONG RefCount; /* Number of references to this object */ PVOID ClientContext; /* Pointer to client context information */ diff --git a/reactos/drivers/net/tcpip/tcpip/dispatch.c b/reactos/drivers/net/tcpip/tcpip/dispatch.c index c6295d5e1a6..7e91f53770e 100644 --- a/reactos/drivers/net/tcpip/tcpip/dispatch.c +++ b/reactos/drivers/net/tcpip/tcpip/dispatch.c @@ -425,12 +425,10 @@ NTSTATUS DispTdiDisassociateAddress( return STATUS_INVALID_PARAMETER; } - KeAcquireSpinLock(&Connection->Lock, &OldIrql); - RemoveEntryList(&Connection->AddrFileEntry); - KeReleaseSpinLock(&Connection->Lock, OldIrql); - /* Remove the reference put on the address file object */ + KeAcquireSpinLock(&Connection->Lock, &OldIrql); DereferenceObject(Connection->AddressFile); + KeReleaseSpinLock(&Connection->Lock, OldIrql); return STATUS_SUCCESS; } diff --git a/reactos/drivers/net/tcpip/tcpip/fileobjs.c b/reactos/drivers/net/tcpip/tcpip/fileobjs.c index 7296044c3c6..4a588bfe458 100644 --- a/reactos/drivers/net/tcpip/tcpip/fileobjs.c +++ b/reactos/drivers/net/tcpip/tcpip/fileobjs.c @@ -141,7 +141,6 @@ VOID DeleteConnectionEndpoint( /* Dereference and remove the address file if it exists */ if (Connection->AddressFile) { - RemoveEntryList(&Connection->AddrFileEntry); DereferenceObject(Connection->AddressFile); } @@ -483,8 +482,8 @@ NTSTATUS FileCloseConnection( Connection = Request->Handle.ConnectionContext; - KeAcquireSpinLock(&Connection->Lock, &OldIrql); #if 0 + KeAcquireSpinLock(&Connection->Lock, &OldIrql); if ((!AF_IS_BUSY(Connection)) && (Connection->RefCount == 1)) { /* Set connection endpoint file object exclusive to us */ AF_SET_BUSY(Connection);