mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 09:25:44 +00:00
- Make sure IPAddr is non-NULL
- Change STATUS_UNSUCCESSFUL to STATUS_INVALID_PARAMETER svn path=/branches/aicom-network-fixes/; revision=35579
This commit is contained in:
parent
055139fc07
commit
e2c0738526
1 changed files with 8 additions and 1 deletions
|
@ -61,6 +61,13 @@ static VOID SatisfyPreAccept( PIRP Irp, PAFD_TDI_OBJECT_QELT Qelt ) {
|
|||
|
||||
IPAddr = (PTA_IP_ADDRESS)&ListenReceive->Address;
|
||||
|
||||
if( !IPAddr ) {
|
||||
if( Irp->MdlAddress ) UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) );
|
||||
Irp->IoStatus.Status = STATUS_NO_MEMORY;
|
||||
Irp->IoStatus.Information = 0;
|
||||
IoCompleteRequest( Irp, IO_NETWORK_INCREMENT );
|
||||
}
|
||||
|
||||
AFD_DbgPrint(MID_TRACE,("IPAddr->TAAddressCount %d\n",
|
||||
IPAddr->TAAddressCount));
|
||||
AFD_DbgPrint(MID_TRACE,("IPAddr->Address[0].AddressType %d\n",
|
||||
|
@ -172,7 +179,7 @@ NTSTATUS AfdListenSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
|||
0, NULL );
|
||||
|
||||
if( FCB->State != SOCKET_STATE_BOUND ) {
|
||||
Status = STATUS_UNSUCCESSFUL;
|
||||
Status = STATUS_INVALID_PARAMETER;
|
||||
AFD_DbgPrint(MID_TRACE,("Could not listen an unbound socket\n"));
|
||||
return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue