mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 09:13:01 +00:00
- Make sure we successfully allocated ConnectionReturnInfo and ConnectionCallInfo
- Make sure ObReferenceObjectByHandle was successful svn path=/branches/aicom-network-fixes/; revision=35398
This commit is contained in:
parent
05a4dffa6e
commit
54a02c3ea8
1 changed files with 9 additions and 2 deletions
|
@ -188,8 +188,6 @@ NTSTATUS AfdListenSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
|||
|
||||
if( !NT_SUCCESS(Status) ) return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL );
|
||||
|
||||
FCB->State = SOCKET_STATE_LISTENING;
|
||||
|
||||
TdiBuildNullConnectionInfo
|
||||
( &FCB->ListenIrp.ConnectionCallInfo,
|
||||
FCB->LocalAddress->Address[0].AddressType );
|
||||
|
@ -197,6 +195,11 @@ NTSTATUS AfdListenSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
|||
( &FCB->ListenIrp.ConnectionReturnInfo,
|
||||
FCB->LocalAddress->Address[0].AddressType );
|
||||
|
||||
if( !FCB->ListenIrp.ConnectionReturnInfo || !FCB->ListenIrp.ConnectionCallInfo )
|
||||
return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0, NULL );
|
||||
|
||||
FCB->State = SOCKET_STATE_LISTENING;
|
||||
|
||||
Status = TdiListen( &FCB->ListenIrp.InFlightRequest,
|
||||
FCB->Connection.Object,
|
||||
&FCB->ListenIrp.ConnectionCallInfo,
|
||||
|
@ -271,6 +274,8 @@ NTSTATUS AfdAccept( PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
|||
( &FCB->ListenIrp.ConnectionReturnInfo,
|
||||
FCB->LocalAddress->Address[0].AddressType );
|
||||
|
||||
if( !FCB->ListenIrp.ConnectionReturnInfo ) return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0, NULL );
|
||||
|
||||
Status = TdiListen( &FCB->ListenIrp.InFlightRequest,
|
||||
FCB->Connection.Object,
|
||||
&FCB->ListenIrp.ConnectionCallInfo,
|
||||
|
@ -305,6 +310,8 @@ NTSTATUS AfdAccept( PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
|||
(PVOID *)&NewFileObject,
|
||||
NULL );
|
||||
|
||||
if( !NT_SUCCESS(Status) ) UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL );
|
||||
|
||||
ASSERT(NewFileObject != FileObject);
|
||||
ASSERT(NewFileObject->FsContext != FCB);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue