mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:03:00 +00:00
Fix crash when closing unconnected socket
svn path=/trunk/; revision=12388
This commit is contained in:
parent
cffcbe1d74
commit
13b05d6081
1 changed files with 13 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: main.c,v 1.17 2004/12/25 21:30:17 arty Exp $
|
/* $Id: main.c,v 1.18 2004/12/29 21:44:44 gvg Exp $
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
* FILE: drivers/net/afd/afd/main.c
|
* FILE: drivers/net/afd/afd/main.c
|
||||||
|
@ -244,12 +244,19 @@ AfdDisconnect(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY,
|
return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY,
|
||||||
Irp, 0, NULL, FALSE );
|
Irp, 0, NULL, FALSE );
|
||||||
|
|
||||||
|
if (NULL == FCB->RemoteAddress)
|
||||||
|
{
|
||||||
|
ConnInfo = NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
Status = TdiBuildNullConnectionInfo
|
Status = TdiBuildNullConnectionInfo
|
||||||
( &ConnInfo, FCB->RemoteAddress->Address[0].AddressType );
|
( &ConnInfo, FCB->RemoteAddress->Address[0].AddressType );
|
||||||
|
|
||||||
if( !NT_SUCCESS(Status) || !ConnInfo )
|
if( !NT_SUCCESS(Status) || !ConnInfo )
|
||||||
return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY,
|
return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY,
|
||||||
Irp, 0, NULL, TRUE );
|
Irp, 0, NULL, TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
if( DisReq->DisconnectType & AFD_DISCONNECT_SEND )
|
if( DisReq->DisconnectType & AFD_DISCONNECT_SEND )
|
||||||
Flags |= TDI_DISCONNECT_RELEASE;
|
Flags |= TDI_DISCONNECT_RELEASE;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue