mirror of
https://github.com/reactos/reactos.git
synced 2025-04-04 20:50:41 +00:00
[AFD] Introduce and use pool tags. Thanks go to Arty for assisting me with this. CORE-14048
This commit is contained in:
parent
a2cc76af84
commit
b8309397b5
14 changed files with 269 additions and 123 deletions
|
@ -43,7 +43,10 @@ NTSTATUS WarmSocketForBind( PAFD_FCB FCB, ULONG ShareType ) {
|
||||||
|
|
||||||
if (NT_SUCCESS(Status) && !FCB->Recv.Window)
|
if (NT_SUCCESS(Status) && !FCB->Recv.Window)
|
||||||
{
|
{
|
||||||
FCB->Recv.Window = ExAllocatePool(PagedPool, FCB->Recv.Size);
|
FCB->Recv.Window = ExAllocatePoolWithTag(PagedPool,
|
||||||
|
FCB->Recv.Size,
|
||||||
|
TAG_AFD_DATA_BUFFER);
|
||||||
|
|
||||||
if (!FCB->Recv.Window)
|
if (!FCB->Recv.Window)
|
||||||
Status = STATUS_NO_MEMORY;
|
Status = STATUS_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
@ -87,7 +90,11 @@ AfdBindSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY,
|
return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY,
|
||||||
Irp, 0 );
|
Irp, 0 );
|
||||||
|
|
||||||
if( FCB->LocalAddress ) ExFreePool( FCB->LocalAddress );
|
if (FCB->LocalAddress)
|
||||||
|
{
|
||||||
|
ExFreePoolWithTag(FCB->LocalAddress, TAG_AFD_TRANSPORT_ADDRESS);
|
||||||
|
}
|
||||||
|
|
||||||
FCB->LocalAddress = TaCopyTransportAddress( &BindReq->Address );
|
FCB->LocalAddress = TaCopyTransportAddress( &BindReq->Address );
|
||||||
|
|
||||||
if( FCB->LocalAddress )
|
if( FCB->LocalAddress )
|
||||||
|
|
|
@ -59,13 +59,16 @@ AfdSetConnectOptions(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
|
|
||||||
if (FCB->ConnectOptions)
|
if (FCB->ConnectOptions)
|
||||||
{
|
{
|
||||||
ExFreePool(FCB->ConnectOptions);
|
ExFreePoolWithTag(FCB->ConnectOptions, TAG_AFD_CONNECT_OPTIONS);
|
||||||
FCB->ConnectOptions = NULL;
|
FCB->ConnectOptions = NULL;
|
||||||
FCB->ConnectOptionsSize = 0;
|
FCB->ConnectOptionsSize = 0;
|
||||||
FCB->FilledConnectOptions = 0;
|
FCB->FilledConnectOptions = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
FCB->ConnectOptions = ExAllocatePool(PagedPool, ConnectOptionsSize);
|
FCB->ConnectOptions = ExAllocatePoolWithTag(PagedPool,
|
||||||
|
ConnectOptionsSize,
|
||||||
|
TAG_AFD_CONNECT_OPTIONS);
|
||||||
|
|
||||||
if (!FCB->ConnectOptions)
|
if (!FCB->ConnectOptions)
|
||||||
return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0);
|
return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0);
|
||||||
|
|
||||||
|
@ -103,12 +106,15 @@ AfdSetConnectOptionsSize(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
|
|
||||||
if (FCB->ConnectOptions)
|
if (FCB->ConnectOptions)
|
||||||
{
|
{
|
||||||
ExFreePool(FCB->ConnectOptions);
|
ExFreePoolWithTag(FCB->ConnectOptions, TAG_AFD_CONNECT_OPTIONS);
|
||||||
FCB->ConnectOptionsSize = 0;
|
FCB->ConnectOptionsSize = 0;
|
||||||
FCB->FilledConnectOptions = 0;
|
FCB->FilledConnectOptions = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
FCB->ConnectOptions = ExAllocatePool(PagedPool, *ConnectOptionsSize);
|
FCB->ConnectOptions = ExAllocatePoolWithTag(PagedPool,
|
||||||
|
*ConnectOptionsSize,
|
||||||
|
TAG_AFD_CONNECT_OPTIONS);
|
||||||
|
|
||||||
if (!FCB->ConnectOptions) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0);
|
if (!FCB->ConnectOptions) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0);
|
||||||
|
|
||||||
FCB->ConnectOptionsSize = *ConnectOptionsSize;
|
FCB->ConnectOptionsSize = *ConnectOptionsSize;
|
||||||
|
@ -165,13 +171,16 @@ AfdSetConnectData(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
|
|
||||||
if (FCB->ConnectData)
|
if (FCB->ConnectData)
|
||||||
{
|
{
|
||||||
ExFreePool(FCB->ConnectData);
|
ExFreePoolWithTag(FCB->ConnectData, TAG_AFD_CONNECT_DATA);
|
||||||
FCB->ConnectData = NULL;
|
FCB->ConnectData = NULL;
|
||||||
FCB->ConnectDataSize = 0;
|
FCB->ConnectDataSize = 0;
|
||||||
FCB->FilledConnectData = 0;
|
FCB->FilledConnectData = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
FCB->ConnectData = ExAllocatePool(PagedPool, ConnectDataSize);
|
FCB->ConnectData = ExAllocatePoolWithTag(PagedPool,
|
||||||
|
ConnectDataSize,
|
||||||
|
TAG_AFD_CONNECT_DATA);
|
||||||
|
|
||||||
if (!FCB->ConnectData) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0);
|
if (!FCB->ConnectData) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0);
|
||||||
|
|
||||||
RtlCopyMemory(FCB->ConnectData,
|
RtlCopyMemory(FCB->ConnectData,
|
||||||
|
@ -208,12 +217,15 @@ AfdSetConnectDataSize(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
|
|
||||||
if (FCB->ConnectData)
|
if (FCB->ConnectData)
|
||||||
{
|
{
|
||||||
ExFreePool(FCB->ConnectData);
|
ExFreePoolWithTag(FCB->ConnectData, TAG_AFD_CONNECT_DATA);
|
||||||
FCB->ConnectDataSize = 0;
|
FCB->ConnectDataSize = 0;
|
||||||
FCB->FilledConnectData = 0;
|
FCB->FilledConnectData = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
FCB->ConnectData = ExAllocatePool(PagedPool, *ConnectDataSize);
|
FCB->ConnectData = ExAllocatePoolWithTag(PagedPool,
|
||||||
|
*ConnectDataSize,
|
||||||
|
TAG_AFD_CONNECT_DATA);
|
||||||
|
|
||||||
if (!FCB->ConnectData) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0);
|
if (!FCB->ConnectData) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0);
|
||||||
|
|
||||||
FCB->ConnectDataSize = *ConnectDataSize;
|
FCB->ConnectDataSize = *ConnectDataSize;
|
||||||
|
@ -269,13 +281,19 @@ MakeSocketIntoConnection(PAFD_FCB FCB) {
|
||||||
/* Allocate the receive area and start receiving */
|
/* Allocate the receive area and start receiving */
|
||||||
if (!FCB->Recv.Window)
|
if (!FCB->Recv.Window)
|
||||||
{
|
{
|
||||||
FCB->Recv.Window = ExAllocatePool( PagedPool, FCB->Recv.Size );
|
FCB->Recv.Window = ExAllocatePoolWithTag(PagedPool,
|
||||||
|
FCB->Recv.Size,
|
||||||
|
TAG_AFD_DATA_BUFFER);
|
||||||
|
|
||||||
if( !FCB->Recv.Window ) return STATUS_NO_MEMORY;
|
if( !FCB->Recv.Window ) return STATUS_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!FCB->Send.Window)
|
if (!FCB->Send.Window)
|
||||||
{
|
{
|
||||||
FCB->Send.Window = ExAllocatePool( PagedPool, FCB->Send.Size );
|
FCB->Send.Window = ExAllocatePoolWithTag(PagedPool,
|
||||||
|
FCB->Send.Size,
|
||||||
|
TAG_AFD_DATA_BUFFER);
|
||||||
|
|
||||||
if( !FCB->Send.Window ) return STATUS_NO_MEMORY;
|
if( !FCB->Send.Window ) return STATUS_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -434,7 +452,11 @@ AfdStreamSocketConnect(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
|
|
||||||
if( FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS )
|
if( FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS )
|
||||||
{
|
{
|
||||||
if( FCB->RemoteAddress ) ExFreePool( FCB->RemoteAddress );
|
if (FCB->RemoteAddress)
|
||||||
|
{
|
||||||
|
ExFreePoolWithTag(FCB->RemoteAddress, TAG_AFD_TRANSPORT_ADDRESS);
|
||||||
|
}
|
||||||
|
|
||||||
FCB->RemoteAddress =
|
FCB->RemoteAddress =
|
||||||
TaCopyTransportAddress( &ConnectReq->RemoteAddress );
|
TaCopyTransportAddress( &ConnectReq->RemoteAddress );
|
||||||
|
|
||||||
|
@ -455,7 +477,11 @@ AfdStreamSocketConnect(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
return LeaveIrpUntilLater( FCB, Irp, FUNCTION_CONNECT );
|
return LeaveIrpUntilLater( FCB, Irp, FUNCTION_CONNECT );
|
||||||
|
|
||||||
case SOCKET_STATE_CREATED:
|
case SOCKET_STATE_CREATED:
|
||||||
if( FCB->LocalAddress ) ExFreePool( FCB->LocalAddress );
|
if (FCB->LocalAddress)
|
||||||
|
{
|
||||||
|
ExFreePoolWithTag(FCB->LocalAddress, TAG_AFD_TRANSPORT_ADDRESS);
|
||||||
|
}
|
||||||
|
|
||||||
FCB->LocalAddress =
|
FCB->LocalAddress =
|
||||||
TaBuildNullTransportAddress( ConnectReq->RemoteAddress.Address[0].AddressType );
|
TaBuildNullTransportAddress( ConnectReq->RemoteAddress.Address[0].AddressType );
|
||||||
|
|
||||||
|
@ -473,7 +499,11 @@ AfdStreamSocketConnect(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
/* Drop through to SOCKET_STATE_BOUND */
|
/* Drop through to SOCKET_STATE_BOUND */
|
||||||
|
|
||||||
case SOCKET_STATE_BOUND:
|
case SOCKET_STATE_BOUND:
|
||||||
if( FCB->RemoteAddress ) ExFreePool( FCB->RemoteAddress );
|
if (FCB->RemoteAddress)
|
||||||
|
{
|
||||||
|
ExFreePoolWithTag(FCB->RemoteAddress, TAG_AFD_TRANSPORT_ADDRESS);
|
||||||
|
}
|
||||||
|
|
||||||
FCB->RemoteAddress =
|
FCB->RemoteAddress =
|
||||||
TaCopyTransportAddress( &ConnectReq->RemoteAddress );
|
TaCopyTransportAddress( &ConnectReq->RemoteAddress );
|
||||||
|
|
||||||
|
@ -487,14 +517,22 @@ AfdStreamSocketConnect(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
if( !NT_SUCCESS(Status) )
|
if( !NT_SUCCESS(Status) )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (FCB->ConnectReturnInfo) ExFreePool(FCB->ConnectReturnInfo);
|
if (FCB->ConnectReturnInfo)
|
||||||
|
{
|
||||||
|
ExFreePoolWithTag(FCB->ConnectReturnInfo, TAG_AFD_TDI_CONNECTION_INFORMATION);
|
||||||
|
}
|
||||||
|
|
||||||
Status = TdiBuildConnectionInfo
|
Status = TdiBuildConnectionInfo
|
||||||
( &FCB->ConnectReturnInfo,
|
( &FCB->ConnectReturnInfo,
|
||||||
&ConnectReq->RemoteAddress );
|
&ConnectReq->RemoteAddress );
|
||||||
|
|
||||||
if( NT_SUCCESS(Status) )
|
if( NT_SUCCESS(Status) )
|
||||||
{
|
{
|
||||||
if (FCB->ConnectCallInfo) ExFreePool(FCB->ConnectCallInfo);
|
if (FCB->ConnectCallInfo)
|
||||||
|
{
|
||||||
|
ExFreePoolWithTag(FCB->ConnectCallInfo, TAG_AFD_TDI_CONNECTION_INFORMATION);
|
||||||
|
}
|
||||||
|
|
||||||
Status = TdiBuildConnectionInfo(&FCB->ConnectCallInfo,
|
Status = TdiBuildConnectionInfo(&FCB->ConnectCallInfo,
|
||||||
&ConnectReq->RemoteAddress);
|
&ConnectReq->RemoteAddress);
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,12 +75,13 @@ AfdSetContext( PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0);
|
return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0);
|
||||||
|
|
||||||
if( FCB->Context ) {
|
if( FCB->Context ) {
|
||||||
ExFreePool( FCB->Context );
|
ExFreePoolWithTag(FCB->Context, TAG_AFD_SOCKET_CONTEXT);
|
||||||
FCB->ContextSize = 0;
|
FCB->ContextSize = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
FCB->Context = ExAllocatePool( PagedPool,
|
FCB->Context = ExAllocatePoolWithTag(PagedPool,
|
||||||
IrpSp->Parameters.DeviceIoControl.InputBufferLength );
|
IrpSp->Parameters.DeviceIoControl.InputBufferLength,
|
||||||
|
TAG_AFD_SOCKET_CONTEXT);
|
||||||
|
|
||||||
if( !FCB->Context ) return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0 );
|
if( !FCB->Context ) return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0 );
|
||||||
|
|
||||||
|
|
|
@ -55,15 +55,21 @@ NTSTATUS AfdEventReceive(
|
||||||
AFD_DbgPrint(MID_TRACE, ("Receiving (%d) bytes on socket\n",
|
AFD_DbgPrint(MID_TRACE, ("Receiving (%d) bytes on socket\n",
|
||||||
BytesAvailable));
|
BytesAvailable));
|
||||||
|
|
||||||
ReceiveBuffer = ExAllocatePool(NonPagedPool, BytesAvailable);
|
ReceiveBuffer = ExAllocatePoolWithTag(NonPagedPool,
|
||||||
|
BytesAvailable,
|
||||||
|
TAG_AFD_DATA_BUFFER);
|
||||||
|
|
||||||
if (!ReceiveBuffer)
|
if (!ReceiveBuffer)
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
|
||||||
/*Buffer = (PAFD_BUFFER)ExAllocateFromNPagedLookasideList(
|
/*Buffer = (PAFD_BUFFER)ExAllocateFromNPagedLookasideList(
|
||||||
&BufferLookasideList);*/
|
&BufferLookasideList);*/
|
||||||
Buffer = (PAFD_BUFFER)ExAllocatePool(NonPagedPool, sizeof(AFD_BUFFER));
|
Buffer = (PAFD_BUFFER)ExAllocatePoolWithTag(NonPagedPool,
|
||||||
|
sizeof(AFD_BUFFER),
|
||||||
|
TAG_AFD_DATA_BUFFER);
|
||||||
|
|
||||||
if (!Buffer) {
|
if (!Buffer) {
|
||||||
ExFreePool(ReceiveBuffer);
|
ExFreePoolWithTag(ReceiveBuffer, TAG_AFD_DATA_BUFFER);
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,15 +155,21 @@ NTSTATUS AfdEventReceiveDatagramHandler(
|
||||||
AFD_DbgPrint(MID_TRACE, ("Receiving (%d) bytes from (0x%X).\n",
|
AFD_DbgPrint(MID_TRACE, ("Receiving (%d) bytes from (0x%X).\n",
|
||||||
BytesAvailable, *(PULONG)SourceAddress));
|
BytesAvailable, *(PULONG)SourceAddress));
|
||||||
|
|
||||||
ReceiveBuffer = ExAllocatePool(NonPagedPool, BytesAvailable);
|
ReceiveBuffer = ExAllocatePoolWithTag(NonPagedPool,
|
||||||
|
BytesAvailable,
|
||||||
|
TAG_AFD_DATA_BUFFER);
|
||||||
|
|
||||||
if (!ReceiveBuffer)
|
if (!ReceiveBuffer)
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
|
||||||
/*Buffer = (PAFD_BUFFER)ExAllocateFromNPagedLookasideList(
|
/*Buffer = (PAFD_BUFFER)ExAllocateFromNPagedLookasideList(
|
||||||
&BufferLookasideList);*/
|
&BufferLookasideList);*/
|
||||||
Buffer = (PAFD_BUFFER)ExAllocatePool(NonPagedPool, sizeof(AFD_BUFFER));
|
Buffer = (PAFD_BUFFER)ExAllocatePoolWithTag(NonPagedPool,
|
||||||
|
sizeof(AFD_BUFFER),
|
||||||
|
TAG_AFD_DATA_BUFFER);
|
||||||
|
|
||||||
if (!Buffer) {
|
if (!Buffer) {
|
||||||
ExFreePool(ReceiveBuffer);
|
ExFreePoolWithTag(ReceiveBuffer, TAG_AFD_DATA_BUFFER);
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,10 @@ AfdSetInfo( PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
FCB->OobInline = InfoReq->Information.Boolean;
|
FCB->OobInline = InfoReq->Information.Boolean;
|
||||||
break;
|
break;
|
||||||
case AFD_INFO_RECEIVE_WINDOW_SIZE:
|
case AFD_INFO_RECEIVE_WINDOW_SIZE:
|
||||||
NewBuffer = ExAllocatePool(PagedPool, InfoReq->Information.Ulong);
|
NewBuffer = ExAllocatePoolWithTag(PagedPool,
|
||||||
|
InfoReq->Information.Ulong,
|
||||||
|
TAG_AFD_DATA_BUFFER);
|
||||||
|
|
||||||
if (NewBuffer)
|
if (NewBuffer)
|
||||||
{
|
{
|
||||||
if (FCB->Recv.Content > InfoReq->Information.Ulong)
|
if (FCB->Recv.Content > InfoReq->Information.Ulong)
|
||||||
|
@ -136,7 +139,7 @@ AfdSetInfo( PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
FCB->Recv.Window,
|
FCB->Recv.Window,
|
||||||
FCB->Recv.Content);
|
FCB->Recv.Content);
|
||||||
|
|
||||||
ExFreePool(FCB->Recv.Window);
|
ExFreePoolWithTag(FCB->Recv.Window, TAG_AFD_DATA_BUFFER);
|
||||||
}
|
}
|
||||||
|
|
||||||
FCB->Recv.Size = InfoReq->Information.Ulong;
|
FCB->Recv.Size = InfoReq->Information.Ulong;
|
||||||
|
@ -150,7 +153,10 @@ AfdSetInfo( PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case AFD_INFO_SEND_WINDOW_SIZE:
|
case AFD_INFO_SEND_WINDOW_SIZE:
|
||||||
NewBuffer = ExAllocatePool(PagedPool, InfoReq->Information.Ulong);
|
NewBuffer = ExAllocatePoolWithTag(PagedPool,
|
||||||
|
InfoReq->Information.Ulong,
|
||||||
|
TAG_AFD_DATA_BUFFER);
|
||||||
|
|
||||||
if (NewBuffer)
|
if (NewBuffer)
|
||||||
{
|
{
|
||||||
if (FCB->Send.BytesUsed > InfoReq->Information.Ulong)
|
if (FCB->Send.BytesUsed > InfoReq->Information.Ulong)
|
||||||
|
@ -162,7 +168,7 @@ AfdSetInfo( PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
FCB->Send.Window,
|
FCB->Send.Window,
|
||||||
FCB->Send.BytesUsed);
|
FCB->Send.BytesUsed);
|
||||||
|
|
||||||
ExFreePool(FCB->Send.Window);
|
ExFreePoolWithTag(FCB->Send.Window, TAG_AFD_DATA_BUFFER);
|
||||||
}
|
}
|
||||||
|
|
||||||
FCB->Send.Size = InfoReq->Information.Ulong;
|
FCB->Send.Size = InfoReq->Information.Ulong;
|
||||||
|
|
|
@ -27,7 +27,11 @@ static NTSTATUS SatisfyAccept( PAFD_DEVICE_EXTENSION DeviceExt,
|
||||||
|
|
||||||
FCB->Connection = Qelt->Object;
|
FCB->Connection = Qelt->Object;
|
||||||
|
|
||||||
if( FCB->RemoteAddress ) ExFreePool( FCB->RemoteAddress );
|
if (FCB->RemoteAddress)
|
||||||
|
{
|
||||||
|
ExFreePoolWithTag(FCB->RemoteAddress, TAG_AFD_TRANSPORT_ADDRESS);
|
||||||
|
}
|
||||||
|
|
||||||
FCB->RemoteAddress =
|
FCB->RemoteAddress =
|
||||||
TaCopyTransportAddress( Qelt->ConnInfo->RemoteAddress );
|
TaCopyTransportAddress( Qelt->ConnInfo->RemoteAddress );
|
||||||
|
|
||||||
|
@ -115,13 +119,17 @@ static NTSTATUS NTAPI ListenComplete( PDEVICE_OBJECT DeviceObject,
|
||||||
/* Free ConnectionReturnInfo and ConnectionCallInfo */
|
/* Free ConnectionReturnInfo and ConnectionCallInfo */
|
||||||
if (FCB->ListenIrp.ConnectionReturnInfo)
|
if (FCB->ListenIrp.ConnectionReturnInfo)
|
||||||
{
|
{
|
||||||
ExFreePool(FCB->ListenIrp.ConnectionReturnInfo);
|
ExFreePoolWithTag(FCB->ListenIrp.ConnectionReturnInfo,
|
||||||
|
TAG_AFD_TDI_CONNECTION_INFORMATION);
|
||||||
|
|
||||||
FCB->ListenIrp.ConnectionReturnInfo = NULL;
|
FCB->ListenIrp.ConnectionReturnInfo = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FCB->ListenIrp.ConnectionCallInfo)
|
if (FCB->ListenIrp.ConnectionCallInfo)
|
||||||
{
|
{
|
||||||
ExFreePool(FCB->ListenIrp.ConnectionCallInfo);
|
ExFreePoolWithTag(FCB->ListenIrp.ConnectionCallInfo,
|
||||||
|
TAG_AFD_TDI_CONNECTION_INFORMATION);
|
||||||
|
|
||||||
FCB->ListenIrp.ConnectionCallInfo = NULL;
|
FCB->ListenIrp.ConnectionCallInfo = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +146,10 @@ static NTSTATUS NTAPI ListenComplete( PDEVICE_OBJECT DeviceObject,
|
||||||
return Irp->IoStatus.Status;
|
return Irp->IoStatus.Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
Qelt = ExAllocatePool( NonPagedPool, sizeof(*Qelt) );
|
Qelt = ExAllocatePoolWithTag(NonPagedPool,
|
||||||
|
sizeof(*Qelt),
|
||||||
|
TAG_AFD_ACCEPT_QUEUE);
|
||||||
|
|
||||||
if( !Qelt ) {
|
if( !Qelt ) {
|
||||||
Status = STATUS_NO_MEMORY;
|
Status = STATUS_NO_MEMORY;
|
||||||
} else {
|
} else {
|
||||||
|
@ -256,7 +267,9 @@ NTSTATUS AfdListenSocket( PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
ExFreePool(FCB->ListenIrp.ConnectionCallInfo);
|
ExFreePoolWithTag(FCB->ListenIrp.ConnectionCallInfo,
|
||||||
|
TAG_AFD_TDI_CONNECTION_INFORMATION);
|
||||||
|
|
||||||
FCB->ListenIrp.ConnectionCallInfo = NULL;
|
FCB->ListenIrp.ConnectionCallInfo = NULL;
|
||||||
return UnlockAndMaybeComplete(FCB, Status, Irp, 0);
|
return UnlockAndMaybeComplete(FCB, Status, Irp, 0);
|
||||||
}
|
}
|
||||||
|
@ -372,7 +385,7 @@ NTSTATUS AfdAccept( PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
|
|
||||||
AFD_DbgPrint(MID_TRACE,("Completed a wait for accept\n"));
|
AFD_DbgPrint(MID_TRACE,("Completed a wait for accept\n"));
|
||||||
|
|
||||||
ExFreePool( PendingConnObj );
|
ExFreePoolWithTag(PendingConnObj, TAG_AFD_ACCEPT_QUEUE);
|
||||||
|
|
||||||
if( !IsListEmpty( &FCB->PendingConnections ) )
|
if( !IsListEmpty( &FCB->PendingConnections ) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -69,7 +69,10 @@ PVOID LockRequest( PIRP Irp,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The allocated address goes in index 0 */
|
/* The allocated address goes in index 0 */
|
||||||
Irp->Tail.Overlay.DriverContext[0] = ExAllocatePool(NonPagedPool, MmGetMdlByteCount(Irp->MdlAddress));
|
Irp->Tail.Overlay.DriverContext[0] = ExAllocatePoolWithTag(NonPagedPool,
|
||||||
|
MmGetMdlByteCount(Irp->MdlAddress),
|
||||||
|
TAG_AFD_DATA_BUFFER);
|
||||||
|
|
||||||
if (!Irp->Tail.Overlay.DriverContext[0])
|
if (!Irp->Tail.Overlay.DriverContext[0])
|
||||||
{
|
{
|
||||||
AFD_DbgPrint(MIN_TRACE,("Failed to allocate memory\n"));
|
AFD_DbgPrint(MIN_TRACE,("Failed to allocate memory\n"));
|
||||||
|
@ -126,7 +129,10 @@ PVOID LockRequest( PIRP Irp,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We need to create the info struct that AFD expects for all send/recv requests */
|
/* We need to create the info struct that AFD expects for all send/recv requests */
|
||||||
AfdInfo = ExAllocatePool(NonPagedPool, sizeof(AFD_RECV_INFO) + sizeof(AFD_WSABUF));
|
AfdInfo = ExAllocatePoolWithTag(NonPagedPool,
|
||||||
|
sizeof(AFD_RECV_INFO) + sizeof(AFD_WSABUF),
|
||||||
|
TAG_AFD_DATA_BUFFER);
|
||||||
|
|
||||||
if (!AfdInfo)
|
if (!AfdInfo)
|
||||||
{
|
{
|
||||||
AFD_DbgPrint(MIN_TRACE,("Failed to allocate memory\n"));
|
AFD_DbgPrint(MIN_TRACE,("Failed to allocate memory\n"));
|
||||||
|
@ -186,7 +192,7 @@ VOID UnlockRequest( PIRP Irp, PIO_STACK_LOCATION IrpSp )
|
||||||
MmGetMdlByteCount(Irp->MdlAddress));
|
MmGetMdlByteCount(Irp->MdlAddress));
|
||||||
}
|
}
|
||||||
|
|
||||||
ExFreePool(Irp->Tail.Overlay.DriverContext[0]);
|
ExFreePoolWithTag(Irp->Tail.Overlay.DriverContext[0], TAG_AFD_DATA_BUFFER);
|
||||||
MmUnlockPages( Irp->MdlAddress );
|
MmUnlockPages( Irp->MdlAddress );
|
||||||
IoFreeMdl( Irp->MdlAddress );
|
IoFreeMdl( Irp->MdlAddress );
|
||||||
Irp->MdlAddress = NULL;
|
Irp->MdlAddress = NULL;
|
||||||
|
@ -204,7 +210,7 @@ PAFD_WSABUF LockBuffers( PAFD_WSABUF Buf, UINT Count,
|
||||||
/* Copy the buffer array so we don't lose it */
|
/* Copy the buffer array so we don't lose it */
|
||||||
UINT Lock = LockAddress ? 2 : 0;
|
UINT Lock = LockAddress ? 2 : 0;
|
||||||
UINT Size = (sizeof(AFD_WSABUF) + sizeof(AFD_MAPBUF)) * (Count + Lock);
|
UINT Size = (sizeof(AFD_WSABUF) + sizeof(AFD_MAPBUF)) * (Count + Lock);
|
||||||
PAFD_WSABUF NewBuf = ExAllocatePool( PagedPool, Size );
|
PAFD_WSABUF NewBuf = ExAllocatePoolWithTag(PagedPool, Size, TAG_AFD_WSA_BUFFER);
|
||||||
BOOLEAN LockFailed = FALSE;
|
BOOLEAN LockFailed = FALSE;
|
||||||
PAFD_MAPBUF MapBuf;
|
PAFD_MAPBUF MapBuf;
|
||||||
|
|
||||||
|
@ -230,7 +236,7 @@ PAFD_WSABUF LockBuffers( PAFD_WSABUF Buf, UINT Count,
|
||||||
AFD_DbgPrint(MIN_TRACE,("Access violation copying buffer info "
|
AFD_DbgPrint(MIN_TRACE,("Access violation copying buffer info "
|
||||||
"from userland (%p %p)\n",
|
"from userland (%p %p)\n",
|
||||||
Buf, AddressLen));
|
Buf, AddressLen));
|
||||||
ExFreePool( NewBuf );
|
ExFreePoolWithTag(NewBuf, TAG_AFD_WSA_BUFFER);
|
||||||
_SEH2_YIELD(return NULL);
|
_SEH2_YIELD(return NULL);
|
||||||
} _SEH2_END;
|
} _SEH2_END;
|
||||||
|
|
||||||
|
@ -265,11 +271,11 @@ PAFD_WSABUF LockBuffers( PAFD_WSABUF Buf, UINT Count,
|
||||||
AFD_DbgPrint(MIN_TRACE,("Failed to lock pages\n"));
|
AFD_DbgPrint(MIN_TRACE,("Failed to lock pages\n"));
|
||||||
IoFreeMdl( MapBuf[i].Mdl );
|
IoFreeMdl( MapBuf[i].Mdl );
|
||||||
MapBuf[i].Mdl = NULL;
|
MapBuf[i].Mdl = NULL;
|
||||||
ExFreePool( NewBuf );
|
ExFreePoolWithTag(NewBuf, TAG_AFD_WSA_BUFFER);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ExFreePool( NewBuf );
|
ExFreePoolWithTag(NewBuf, TAG_AFD_WSA_BUFFER);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -295,7 +301,7 @@ VOID UnlockBuffers( PAFD_WSABUF Buf, UINT Count, BOOL Address ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ExFreePool( Buf );
|
ExFreePoolWithTag(Buf, TAG_AFD_WSA_BUFFER);
|
||||||
Buf = NULL;
|
Buf = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -305,8 +311,9 @@ PAFD_HANDLE LockHandles( PAFD_HANDLE HandleArray, UINT HandleCount ) {
|
||||||
UINT i;
|
UINT i;
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
|
|
||||||
PAFD_HANDLE FileObjects = ExAllocatePool
|
PAFD_HANDLE FileObjects = ExAllocatePoolWithTag(NonPagedPool,
|
||||||
( NonPagedPool, HandleCount * sizeof(AFD_HANDLE) );
|
HandleCount * sizeof(AFD_HANDLE),
|
||||||
|
TAG_AFD_POLL_HANDLE);
|
||||||
|
|
||||||
for( i = 0; FileObjects && i < HandleCount; i++ ) {
|
for( i = 0; FileObjects && i < HandleCount; i++ ) {
|
||||||
FileObjects[i].Status = 0;
|
FileObjects[i].Status = 0;
|
||||||
|
@ -346,7 +353,7 @@ VOID UnlockHandles( PAFD_HANDLE HandleArray, UINT HandleCount ) {
|
||||||
ObDereferenceObject( (PVOID)HandleArray[i].Handle );
|
ObDereferenceObject( (PVOID)HandleArray[i].Handle );
|
||||||
}
|
}
|
||||||
|
|
||||||
ExFreePool( HandleArray );
|
ExFreePoolWithTag(HandleArray, TAG_AFD_POLL_HANDLE);
|
||||||
HandleArray = NULL;
|
HandleArray = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,13 +86,16 @@ AfdSetDisconnectOptions(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
|
|
||||||
if (FCB->DisconnectOptions)
|
if (FCB->DisconnectOptions)
|
||||||
{
|
{
|
||||||
ExFreePool(FCB->DisconnectOptions);
|
ExFreePoolWithTag(FCB->DisconnectOptions, TAG_AFD_DISCONNECT_OPTIONS);
|
||||||
FCB->DisconnectOptions = NULL;
|
FCB->DisconnectOptions = NULL;
|
||||||
FCB->DisconnectOptionsSize = 0;
|
FCB->DisconnectOptionsSize = 0;
|
||||||
FCB->FilledDisconnectOptions = 0;
|
FCB->FilledDisconnectOptions = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
FCB->DisconnectOptions = ExAllocatePool(PagedPool, DisconnectOptionsSize);
|
FCB->DisconnectOptions = ExAllocatePoolWithTag(PagedPool,
|
||||||
|
DisconnectOptionsSize,
|
||||||
|
TAG_AFD_DISCONNECT_OPTIONS);
|
||||||
|
|
||||||
if (!FCB->DisconnectOptions)
|
if (!FCB->DisconnectOptions)
|
||||||
return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0);
|
return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0);
|
||||||
|
|
||||||
|
@ -130,12 +133,15 @@ AfdSetDisconnectOptionsSize(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
|
|
||||||
if (FCB->DisconnectOptions)
|
if (FCB->DisconnectOptions)
|
||||||
{
|
{
|
||||||
ExFreePool(FCB->DisconnectOptions);
|
ExFreePoolWithTag(FCB->DisconnectOptions, TAG_AFD_DISCONNECT_OPTIONS);
|
||||||
FCB->DisconnectOptionsSize = 0;
|
FCB->DisconnectOptionsSize = 0;
|
||||||
FCB->FilledDisconnectOptions = 0;
|
FCB->FilledDisconnectOptions = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
FCB->DisconnectOptions = ExAllocatePool(PagedPool, *DisconnectOptionsSize);
|
FCB->DisconnectOptions = ExAllocatePoolWithTag(PagedPool,
|
||||||
|
*DisconnectOptionsSize,
|
||||||
|
TAG_AFD_DISCONNECT_OPTIONS);
|
||||||
|
|
||||||
if (!FCB->DisconnectOptions) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0);
|
if (!FCB->DisconnectOptions) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0);
|
||||||
|
|
||||||
FCB->DisconnectOptionsSize = *DisconnectOptionsSize;
|
FCB->DisconnectOptionsSize = *DisconnectOptionsSize;
|
||||||
|
@ -192,13 +198,16 @@ AfdSetDisconnectData(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
|
|
||||||
if (FCB->DisconnectData)
|
if (FCB->DisconnectData)
|
||||||
{
|
{
|
||||||
ExFreePool(FCB->DisconnectData);
|
ExFreePoolWithTag(FCB->DisconnectData, TAG_AFD_DISCONNECT_DATA);
|
||||||
FCB->DisconnectData = NULL;
|
FCB->DisconnectData = NULL;
|
||||||
FCB->DisconnectDataSize = 0;
|
FCB->DisconnectDataSize = 0;
|
||||||
FCB->FilledDisconnectData = 0;
|
FCB->FilledDisconnectData = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
FCB->DisconnectData = ExAllocatePool(PagedPool, DisconnectDataSize);
|
FCB->DisconnectData = ExAllocatePoolWithTag(PagedPool,
|
||||||
|
DisconnectDataSize,
|
||||||
|
TAG_AFD_DISCONNECT_DATA);
|
||||||
|
|
||||||
if (!FCB->DisconnectData)
|
if (!FCB->DisconnectData)
|
||||||
return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0);
|
return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0);
|
||||||
|
|
||||||
|
@ -236,12 +245,15 @@ AfdSetDisconnectDataSize(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
|
|
||||||
if (FCB->DisconnectData)
|
if (FCB->DisconnectData)
|
||||||
{
|
{
|
||||||
ExFreePool(FCB->DisconnectData);
|
ExFreePoolWithTag(FCB->DisconnectData, TAG_AFD_DISCONNECT_DATA);
|
||||||
FCB->DisconnectDataSize = 0;
|
FCB->DisconnectDataSize = 0;
|
||||||
FCB->FilledDisconnectData = 0;
|
FCB->FilledDisconnectData = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
FCB->DisconnectData = ExAllocatePool(PagedPool, *DisconnectDataSize);
|
FCB->DisconnectData = ExAllocatePoolWithTag(PagedPool,
|
||||||
|
*DisconnectDataSize,
|
||||||
|
TAG_AFD_DISCONNECT_DATA);
|
||||||
|
|
||||||
if (!FCB->DisconnectData)
|
if (!FCB->DisconnectData)
|
||||||
return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0);
|
return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0);
|
||||||
|
|
||||||
|
@ -319,7 +331,7 @@ AfdCreateSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
|
|
||||||
AFD_DbgPrint(MID_TRACE,("About to allocate the new FCB\n"));
|
AFD_DbgPrint(MID_TRACE,("About to allocate the new FCB\n"));
|
||||||
|
|
||||||
FCB = ExAllocatePool(NonPagedPool, sizeof(AFD_FCB));
|
FCB = ExAllocatePoolWithTag(NonPagedPool, sizeof(AFD_FCB), TAG_AFD_FCB);
|
||||||
if( FCB == NULL ) {
|
if( FCB == NULL ) {
|
||||||
Irp->IoStatus.Status = STATUS_NO_MEMORY;
|
Irp->IoStatus.Status = STATUS_NO_MEMORY;
|
||||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||||
|
@ -354,11 +366,12 @@ AfdCreateSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
if( ConnectInfo ) {
|
if( ConnectInfo ) {
|
||||||
FCB->TdiDeviceName.Length = ConnectInfo->SizeOfTransportName;
|
FCB->TdiDeviceName.Length = ConnectInfo->SizeOfTransportName;
|
||||||
FCB->TdiDeviceName.MaximumLength = FCB->TdiDeviceName.Length;
|
FCB->TdiDeviceName.MaximumLength = FCB->TdiDeviceName.Length;
|
||||||
FCB->TdiDeviceName.Buffer =
|
FCB->TdiDeviceName.Buffer = ExAllocatePoolWithTag(NonPagedPool,
|
||||||
ExAllocatePool( NonPagedPool, FCB->TdiDeviceName.Length );
|
FCB->TdiDeviceName.Length,
|
||||||
|
TAG_AFD_TRANSPORT_ADDRESS);
|
||||||
|
|
||||||
if( !FCB->TdiDeviceName.Buffer ) {
|
if( !FCB->TdiDeviceName.Buffer ) {
|
||||||
ExFreePool(FCB);
|
ExFreePoolWithTag(FCB, TAG_AFD_FCB);
|
||||||
AFD_DbgPrint(MID_TRACE,("Could not copy target string\n"));
|
AFD_DbgPrint(MID_TRACE,("Could not copy target string\n"));
|
||||||
Irp->IoStatus.Status = STATUS_NO_MEMORY;
|
Irp->IoStatus.Status = STATUS_NO_MEMORY;
|
||||||
IoCompleteRequest( Irp, IO_NETWORK_INCREMENT );
|
IoCompleteRequest( Irp, IO_NETWORK_INCREMENT );
|
||||||
|
@ -388,8 +401,11 @@ AfdCreateSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !NT_SUCCESS(Status) ) {
|
if( !NT_SUCCESS(Status) ) {
|
||||||
if( FCB->TdiDeviceName.Buffer ) ExFreePool( FCB->TdiDeviceName.Buffer );
|
if (FCB->TdiDeviceName.Buffer)
|
||||||
ExFreePool( FCB );
|
{
|
||||||
|
ExFreePoolWithTag(FCB->TdiDeviceName.Buffer, TAG_AFD_TRANSPORT_ADDRESS);
|
||||||
|
}
|
||||||
|
ExFreePoolWithTag(FCB, TAG_AFD_FCB);
|
||||||
FileObject->FsContext = NULL;
|
FileObject->FsContext = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -485,7 +501,7 @@ AfdCloseSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
ObDereferenceObject(Qelt->Object.Object);
|
ObDereferenceObject(Qelt->Object.Object);
|
||||||
ZwClose(Qelt->Object.Handle);
|
ZwClose(Qelt->Object.Handle);
|
||||||
|
|
||||||
ExFreePool(Qelt);
|
ExFreePoolWithTag(Qelt, TAG_AFD_ACCEPT_QUEUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
SocketStateUnlock( FCB );
|
SocketStateUnlock( FCB );
|
||||||
|
@ -493,41 +509,41 @@ AfdCloseSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
if( FCB->EventSelect )
|
if( FCB->EventSelect )
|
||||||
ObDereferenceObject( FCB->EventSelect );
|
ObDereferenceObject( FCB->EventSelect );
|
||||||
|
|
||||||
if( FCB->Context )
|
if (FCB->Context)
|
||||||
ExFreePool( FCB->Context );
|
ExFreePoolWithTag(FCB->Context, TAG_AFD_SOCKET_CONTEXT);
|
||||||
|
|
||||||
if( FCB->Recv.Window )
|
if (FCB->Recv.Window)
|
||||||
ExFreePool( FCB->Recv.Window );
|
ExFreePoolWithTag(FCB->Recv.Window, TAG_AFD_DATA_BUFFER);
|
||||||
|
|
||||||
if( FCB->Send.Window )
|
if (FCB->Send.Window)
|
||||||
ExFreePool( FCB->Send.Window );
|
ExFreePoolWithTag(FCB->Send.Window, TAG_AFD_DATA_BUFFER);
|
||||||
|
|
||||||
if( FCB->AddressFrom )
|
if (FCB->AddressFrom)
|
||||||
ExFreePool( FCB->AddressFrom );
|
ExFreePoolWithTag(FCB->AddressFrom, TAG_AFD_TDI_CONNECTION_INFORMATION);
|
||||||
|
|
||||||
if( FCB->ConnectCallInfo )
|
if (FCB->ConnectCallInfo)
|
||||||
ExFreePool( FCB->ConnectCallInfo );
|
ExFreePoolWithTag(FCB->ConnectCallInfo, TAG_AFD_TDI_CONNECTION_INFORMATION);
|
||||||
|
|
||||||
if( FCB->ConnectReturnInfo )
|
if (FCB->ConnectReturnInfo)
|
||||||
ExFreePool( FCB->ConnectReturnInfo );
|
ExFreePoolWithTag(FCB->ConnectReturnInfo, TAG_AFD_TDI_CONNECTION_INFORMATION);
|
||||||
|
|
||||||
if( FCB->ConnectData )
|
if (FCB->ConnectData)
|
||||||
ExFreePool( FCB->ConnectData );
|
ExFreePoolWithTag(FCB->ConnectData, TAG_AFD_CONNECT_DATA);
|
||||||
|
|
||||||
if( FCB->DisconnectData )
|
if (FCB->DisconnectData)
|
||||||
ExFreePool( FCB->DisconnectData );
|
ExFreePoolWithTag(FCB->DisconnectData, TAG_AFD_DISCONNECT_DATA);
|
||||||
|
|
||||||
if( FCB->ConnectOptions )
|
if (FCB->ConnectOptions)
|
||||||
ExFreePool( FCB->ConnectOptions );
|
ExFreePoolWithTag(FCB->ConnectOptions, TAG_AFD_CONNECT_OPTIONS);
|
||||||
|
|
||||||
if( FCB->DisconnectOptions )
|
if (FCB->DisconnectOptions)
|
||||||
ExFreePool( FCB->DisconnectOptions );
|
ExFreePoolWithTag(FCB->DisconnectOptions, TAG_AFD_DISCONNECT_OPTIONS);
|
||||||
|
|
||||||
if( FCB->LocalAddress )
|
if (FCB->LocalAddress)
|
||||||
ExFreePool( FCB->LocalAddress );
|
ExFreePoolWithTag(FCB->LocalAddress, TAG_AFD_TRANSPORT_ADDRESS);
|
||||||
|
|
||||||
if( FCB->RemoteAddress )
|
if (FCB->RemoteAddress)
|
||||||
ExFreePool( FCB->RemoteAddress );
|
ExFreePoolWithTag(FCB->RemoteAddress, TAG_AFD_TRANSPORT_ADDRESS);
|
||||||
|
|
||||||
if( FCB->Connection.Object )
|
if( FCB->Connection.Object )
|
||||||
{
|
{
|
||||||
|
@ -554,10 +570,12 @@ AfdCloseSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( FCB->TdiDeviceName.Buffer )
|
if (FCB->TdiDeviceName.Buffer)
|
||||||
ExFreePool(FCB->TdiDeviceName.Buffer);
|
{
|
||||||
|
ExFreePoolWithTag(FCB->TdiDeviceName.Buffer, TAG_AFD_TRANSPORT_ADDRESS);
|
||||||
|
}
|
||||||
|
|
||||||
ExFreePool(FCB);
|
ExFreePoolWithTag(FCB, TAG_AFD_FCB);
|
||||||
|
|
||||||
Irp->IoStatus.Status = STATUS_SUCCESS;
|
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||||
Irp->IoStatus.Information = 0;
|
Irp->IoStatus.Information = 0;
|
||||||
|
@ -817,7 +835,7 @@ AfdDisconnect(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
return UnlockAndMaybeComplete(FCB, STATUS_INVALID_PARAMETER, Irp, 0);
|
return UnlockAndMaybeComplete(FCB, STATUS_INVALID_PARAMETER, Irp, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ExFreePool(FCB->RemoteAddress);
|
ExFreePoolWithTag(FCB->RemoteAddress, TAG_AFD_TRANSPORT_ADDRESS);
|
||||||
|
|
||||||
FCB->RemoteAddress = NULL;
|
FCB->RemoteAddress = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -409,8 +409,8 @@ SatisfyPacketRecvRequest( PAFD_FCB FCB, PIRP Irp,
|
||||||
if (!(RecvReq->TdiFlags & TDI_RECEIVE_PEEK))
|
if (!(RecvReq->TdiFlags & TDI_RECEIVE_PEEK))
|
||||||
{
|
{
|
||||||
FCB->Recv.Content -= DatagramRecv->Len;
|
FCB->Recv.Content -= DatagramRecv->Len;
|
||||||
ExFreePool( DatagramRecv->Address );
|
ExFreePoolWithTag(DatagramRecv->Address, TAG_AFD_TRANSPORT_ADDRESS);
|
||||||
ExFreePool( DatagramRecv );
|
ExFreePoolWithTag(DatagramRecv, TAG_AFD_STORED_DATAGRAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
AFD_DbgPrint(MID_TRACE,("Done\n"));
|
AFD_DbgPrint(MID_TRACE,("Done\n"));
|
||||||
|
@ -584,8 +584,8 @@ PacketSocketRecvComplete(
|
||||||
while( !IsListEmpty( &FCB->DatagramList ) ) {
|
while( !IsListEmpty( &FCB->DatagramList ) ) {
|
||||||
DatagramRecvEntry = RemoveHeadList(&FCB->DatagramList);
|
DatagramRecvEntry = RemoveHeadList(&FCB->DatagramList);
|
||||||
DatagramRecv = CONTAINING_RECORD(DatagramRecvEntry, AFD_STORED_DATAGRAM, ListEntry);
|
DatagramRecv = CONTAINING_RECORD(DatagramRecvEntry, AFD_STORED_DATAGRAM, ListEntry);
|
||||||
ExFreePool( DatagramRecv->Address );
|
ExFreePoolWithTag(DatagramRecv->Address, TAG_AFD_TRANSPORT_ADDRESS);
|
||||||
ExFreePool( DatagramRecv );
|
ExFreePoolWithTag(DatagramRecv, TAG_AFD_STORED_DATAGRAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
SocketStateUnlock( FCB );
|
SocketStateUnlock( FCB );
|
||||||
|
@ -604,7 +604,9 @@ PacketSocketRecvComplete(
|
||||||
return STATUS_FILE_CLOSED;
|
return STATUS_FILE_CLOSED;
|
||||||
}
|
}
|
||||||
|
|
||||||
DatagramRecv = ExAllocatePool( NonPagedPool, DGSize );
|
DatagramRecv = ExAllocatePoolWithTag(NonPagedPool,
|
||||||
|
DGSize,
|
||||||
|
TAG_AFD_STORED_DATAGRAM);
|
||||||
|
|
||||||
if( DatagramRecv ) {
|
if( DatagramRecv ) {
|
||||||
DatagramRecv->Len = Irp->IoStatus.Information;
|
DatagramRecv->Len = Irp->IoStatus.Information;
|
||||||
|
@ -620,7 +622,12 @@ PacketSocketRecvComplete(
|
||||||
} else Status = STATUS_NO_MEMORY;
|
} else Status = STATUS_NO_MEMORY;
|
||||||
|
|
||||||
if( !NT_SUCCESS( Status ) ) {
|
if( !NT_SUCCESS( Status ) ) {
|
||||||
if( DatagramRecv ) ExFreePool( DatagramRecv );
|
|
||||||
|
if (DatagramRecv)
|
||||||
|
{
|
||||||
|
ExFreePoolWithTag(DatagramRecv, TAG_AFD_STORED_DATAGRAM);
|
||||||
|
}
|
||||||
|
|
||||||
SocketStateUnlock( FCB );
|
SocketStateUnlock( FCB );
|
||||||
return Status;
|
return Status;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -68,7 +68,7 @@ VOID SignalSocket(
|
||||||
{
|
{
|
||||||
KeCancelTimer( &Poll->Timer );
|
KeCancelTimer( &Poll->Timer );
|
||||||
RemoveEntryList( &Poll->ListEntry );
|
RemoveEntryList( &Poll->ListEntry );
|
||||||
ExFreePool( Poll );
|
ExFreePoolWithTag(Poll, TAG_AFD_ACTIVE_POLL);
|
||||||
}
|
}
|
||||||
|
|
||||||
Irp->IoStatus.Status = Status;
|
Irp->IoStatus.Status = Status;
|
||||||
|
@ -228,7 +228,9 @@ AfdSelect( PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
|
|
||||||
PAFD_ACTIVE_POLL Poll = NULL;
|
PAFD_ACTIVE_POLL Poll = NULL;
|
||||||
|
|
||||||
Poll = ExAllocatePool( NonPagedPool, sizeof(AFD_ACTIVE_POLL) );
|
Poll = ExAllocatePoolWithTag(NonPagedPool,
|
||||||
|
sizeof(AFD_ACTIVE_POLL),
|
||||||
|
TAG_AFD_ACTIVE_POLL);
|
||||||
|
|
||||||
if (Poll){
|
if (Poll){
|
||||||
Poll->Irp = Irp;
|
Poll->Irp = Irp;
|
||||||
|
|
|
@ -196,7 +196,9 @@ NTSTATUS TdiOpenAddressFile(
|
||||||
EaLength = sizeof(FILE_FULL_EA_INFORMATION) +
|
EaLength = sizeof(FILE_FULL_EA_INFORMATION) +
|
||||||
TDI_TRANSPORT_ADDRESS_LENGTH +
|
TDI_TRANSPORT_ADDRESS_LENGTH +
|
||||||
TaLengthOfTransportAddress( Name ) + 1;
|
TaLengthOfTransportAddress( Name ) + 1;
|
||||||
EaInfo = (PFILE_FULL_EA_INFORMATION)ExAllocatePool(NonPagedPool, EaLength);
|
EaInfo = (PFILE_FULL_EA_INFORMATION)ExAllocatePoolWithTag(NonPagedPool,
|
||||||
|
EaLength,
|
||||||
|
TAG_AFD_EA_INFO);
|
||||||
if (!EaInfo)
|
if (!EaInfo)
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
|
||||||
|
@ -217,7 +219,7 @@ NTSTATUS TdiOpenAddressFile(
|
||||||
ShareType,
|
ShareType,
|
||||||
AddressHandle,
|
AddressHandle,
|
||||||
AddressObject);
|
AddressObject);
|
||||||
ExFreePool(EaInfo);
|
ExFreePoolWithTag(EaInfo, TAG_AFD_EA_INFO);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,13 +231,16 @@ NTSTATUS TdiQueryMaxDatagramLength(
|
||||||
PTDI_MAX_DATAGRAM_INFO Buffer;
|
PTDI_MAX_DATAGRAM_INFO Buffer;
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
|
|
||||||
Buffer = ExAllocatePool(NonPagedPool, sizeof(TDI_MAX_DATAGRAM_INFO));
|
Buffer = ExAllocatePoolWithTag(NonPagedPool,
|
||||||
|
sizeof(TDI_MAX_DATAGRAM_INFO),
|
||||||
|
TAG_AFD_DATA_BUFFER);
|
||||||
|
|
||||||
if (!Buffer) return STATUS_NO_MEMORY;
|
if (!Buffer) return STATUS_NO_MEMORY;
|
||||||
|
|
||||||
Mdl = IoAllocateMdl(Buffer, sizeof(TDI_MAX_DATAGRAM_INFO), FALSE, FALSE, NULL);
|
Mdl = IoAllocateMdl(Buffer, sizeof(TDI_MAX_DATAGRAM_INFO), FALSE, FALSE, NULL);
|
||||||
if (!Mdl)
|
if (!Mdl)
|
||||||
{
|
{
|
||||||
ExFreePool(Buffer);
|
ExFreePoolWithTag(Buffer, TAG_AFD_DATA_BUFFER);
|
||||||
return STATUS_NO_MEMORY;
|
return STATUS_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,7 +258,7 @@ NTSTATUS TdiQueryMaxDatagramLength(
|
||||||
{
|
{
|
||||||
AFD_DbgPrint(MIN_TRACE,("Failed to lock pages\n"));
|
AFD_DbgPrint(MIN_TRACE,("Failed to lock pages\n"));
|
||||||
IoFreeMdl(Mdl);
|
IoFreeMdl(Mdl);
|
||||||
ExFreePool(Buffer);
|
ExFreePoolWithTag(Buffer, TAG_AFD_DATA_BUFFER);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -262,13 +267,13 @@ NTSTATUS TdiQueryMaxDatagramLength(
|
||||||
Mdl);
|
Mdl);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
ExFreePool(Buffer);
|
ExFreePoolWithTag(Buffer, TAG_AFD_DATA_BUFFER);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
*MaxDatagramLength = Buffer->MaxDatagramSize;
|
*MaxDatagramLength = Buffer->MaxDatagramSize;
|
||||||
|
|
||||||
ExFreePool(Buffer);
|
ExFreePoolWithTag(Buffer, TAG_AFD_DATA_BUFFER);
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -299,7 +304,9 @@ NTSTATUS TdiOpenConnectionEndpointFile(
|
||||||
TDI_CONNECTION_CONTEXT_LENGTH +
|
TDI_CONNECTION_CONTEXT_LENGTH +
|
||||||
sizeof(PVOID) + 1;
|
sizeof(PVOID) + 1;
|
||||||
|
|
||||||
EaInfo = (PFILE_FULL_EA_INFORMATION)ExAllocatePool(NonPagedPool, EaLength);
|
EaInfo = (PFILE_FULL_EA_INFORMATION)ExAllocatePoolWithTag(NonPagedPool,
|
||||||
|
EaLength,
|
||||||
|
TAG_AFD_EA_INFO);
|
||||||
if (!EaInfo)
|
if (!EaInfo)
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
|
||||||
|
@ -319,7 +326,7 @@ NTSTATUS TdiOpenConnectionEndpointFile(
|
||||||
AFD_SHARE_UNIQUE,
|
AFD_SHARE_UNIQUE,
|
||||||
ConnectionHandle,
|
ConnectionHandle,
|
||||||
ConnectionObject);
|
ConnectionObject);
|
||||||
ExFreePool(EaInfo);
|
ExFreePoolWithTag(EaInfo, TAG_AFD_EA_INFO);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -776,7 +783,9 @@ NTSTATUS TdiQueryAddress(
|
||||||
AFD_DbgPrint(MAX_TRACE, ("Called\n"));
|
AFD_DbgPrint(MAX_TRACE, ("Called\n"));
|
||||||
|
|
||||||
BufferSize = sizeof(TDIEntityID) * 20;
|
BufferSize = sizeof(TDIEntityID) * 20;
|
||||||
Entities = (TDIEntityID*)ExAllocatePool(NonPagedPool, BufferSize);
|
Entities = (TDIEntityID*)ExAllocatePoolWithTag(NonPagedPool,
|
||||||
|
BufferSize,
|
||||||
|
TAG_AFD_TRANSPORT_ADDRESS);
|
||||||
if (!Entities) {
|
if (!Entities) {
|
||||||
AFD_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
|
AFD_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
@ -794,7 +803,7 @@ NTSTATUS TdiQueryAddress(
|
||||||
&BufferSize); /* Output buffer size */
|
&BufferSize); /* Output buffer size */
|
||||||
if (!NT_SUCCESS(Status)) {
|
if (!NT_SUCCESS(Status)) {
|
||||||
AFD_DbgPrint(MIN_TRACE, ("Unable to get list of supported entities (Status = 0x%X).\n", Status));
|
AFD_DbgPrint(MIN_TRACE, ("Unable to get list of supported entities (Status = 0x%X).\n", Status));
|
||||||
ExFreePool(Entities);
|
ExFreePoolWithTag(Entities, TAG_AFD_TRANSPORT_ADDRESS);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -841,7 +850,9 @@ NTSTATUS TdiQueryAddress(
|
||||||
|
|
||||||
if (SnmpInfo.ipsi_numaddr != 0) {
|
if (SnmpInfo.ipsi_numaddr != 0) {
|
||||||
BufferSize = SnmpInfo.ipsi_numaddr * sizeof(IPADDR_ENTRY);
|
BufferSize = SnmpInfo.ipsi_numaddr * sizeof(IPADDR_ENTRY);
|
||||||
IpAddress = (PIPADDR_ENTRY)ExAllocatePool(NonPagedPool, BufferSize);
|
IpAddress = (PIPADDR_ENTRY)ExAllocatePoolWithTag(NonPagedPool,
|
||||||
|
BufferSize,
|
||||||
|
TAG_AFD_SNMP_ADDRESS_INFO);
|
||||||
if (!IpAddress) {
|
if (!IpAddress) {
|
||||||
AFD_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
|
AFD_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
|
||||||
break;
|
break;
|
||||||
|
@ -857,7 +868,7 @@ NTSTATUS TdiQueryAddress(
|
||||||
&BufferSize); /* Output buffer size */
|
&BufferSize); /* Output buffer size */
|
||||||
if (!NT_SUCCESS(Status)) {
|
if (!NT_SUCCESS(Status)) {
|
||||||
AFD_DbgPrint(MIN_TRACE, ("Unable to get IP address (Status = 0x%X).\n", Status));
|
AFD_DbgPrint(MIN_TRACE, ("Unable to get IP address (Status = 0x%X).\n", Status));
|
||||||
ExFreePool(IpAddress);
|
ExFreePoolWithTag(IpAddress, TAG_AFD_SNMP_ADDRESS_INFO);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -869,7 +880,7 @@ NTSTATUS TdiQueryAddress(
|
||||||
*Address = DN2H(IpAddress->Addr);
|
*Address = DN2H(IpAddress->Addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
ExFreePool(IpAddress);
|
ExFreePoolWithTag(IpAddress, TAG_AFD_SNMP_ADDRESS_INFO);
|
||||||
} else {
|
} else {
|
||||||
Status = STATUS_UNSUCCESSFUL;
|
Status = STATUS_UNSUCCESSFUL;
|
||||||
break;
|
break;
|
||||||
|
@ -877,7 +888,7 @@ NTSTATUS TdiQueryAddress(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ExFreePool(Entities);
|
ExFreePoolWithTag(Entities, TAG_AFD_TRANSPORT_ADDRESS);
|
||||||
|
|
||||||
AFD_DbgPrint(MAX_TRACE, ("Leaving\n"));
|
AFD_DbgPrint(MAX_TRACE, ("Leaving\n"));
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,9 @@ PTRANSPORT_ADDRESS TaCopyTransportAddress( PTRANSPORT_ADDRESS OtherAddress ) {
|
||||||
if (!AddrLen)
|
if (!AddrLen)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
A = ExAllocatePool( NonPagedPool, AddrLen );
|
A = ExAllocatePoolWithTag(NonPagedPool,
|
||||||
|
AddrLen,
|
||||||
|
TAG_AFD_TRANSPORT_ADDRESS);
|
||||||
|
|
||||||
if( A )
|
if( A )
|
||||||
TaCopyTransportAddressInPlace( A, OtherAddress );
|
TaCopyTransportAddressInPlace( A, OtherAddress );
|
||||||
|
@ -117,13 +119,13 @@ PTRANSPORT_ADDRESS TaBuildNullTransportAddress(UINT AddressType)
|
||||||
if (!AddrLen)
|
if (!AddrLen)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
A = ExAllocatePool(NonPagedPool, AddrLen);
|
A = ExAllocatePoolWithTag(NonPagedPool, AddrLen, TAG_AFD_TRANSPORT_ADDRESS);
|
||||||
|
|
||||||
if (A)
|
if (A)
|
||||||
{
|
{
|
||||||
if (TdiBuildNullTransportAddressInPlace(A, AddressType) != STATUS_SUCCESS)
|
if (TdiBuildNullTransportAddressInPlace(A, AddressType) != STATUS_SUCCESS)
|
||||||
{
|
{
|
||||||
ExFreePool(A);
|
ExFreePoolWithTag(A, TAG_AFD_TRANSPORT_ADDRESS);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -190,9 +192,9 @@ NTSTATUS TdiBuildNullConnectionInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
ConnInfo = (PTDI_CONNECTION_INFORMATION)
|
ConnInfo = (PTDI_CONNECTION_INFORMATION)
|
||||||
ExAllocatePool(NonPagedPool,
|
ExAllocatePoolWithTag(NonPagedPool,
|
||||||
sizeof(TDI_CONNECTION_INFORMATION) +
|
sizeof(TDI_CONNECTION_INFORMATION) + TdiAddressSize,
|
||||||
TdiAddressSize);
|
TAG_AFD_TDI_CONNECTION_INFORMATION);
|
||||||
if (!ConnInfo) {
|
if (!ConnInfo) {
|
||||||
*ConnectionInfo = NULL;
|
*ConnectionInfo = NULL;
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
@ -202,7 +204,7 @@ NTSTATUS TdiBuildNullConnectionInfo
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
ExFreePool( ConnInfo );
|
ExFreePoolWithTag(ConnInfo, TAG_AFD_TDI_CONNECTION_INFORMATION);
|
||||||
ConnInfo = NULL;
|
ConnInfo = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -398,7 +398,7 @@ AfdConnectedSocketWriteData(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ExFreePool( TargetAddress );
|
ExFreePoolWithTag(TargetAddress, TAG_AFD_TDI_CONNECTION_INFORMATION);
|
||||||
|
|
||||||
SocketStateUnlock(FCB);
|
SocketStateUnlock(FCB);
|
||||||
|
|
||||||
|
@ -597,7 +597,11 @@ AfdPacketSocketWriteData(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
|
|
||||||
if (FCB->State == SOCKET_STATE_CREATED)
|
if (FCB->State == SOCKET_STATE_CREATED)
|
||||||
{
|
{
|
||||||
if( FCB->LocalAddress ) ExFreePool( FCB->LocalAddress );
|
if (FCB->LocalAddress)
|
||||||
|
{
|
||||||
|
ExFreePoolWithTag(FCB->LocalAddress, TAG_AFD_TRANSPORT_ADDRESS);
|
||||||
|
}
|
||||||
|
|
||||||
FCB->LocalAddress =
|
FCB->LocalAddress =
|
||||||
TaBuildNullTransportAddress( ((PTRANSPORT_ADDRESS)SendReq->TdiConnection.RemoteAddress)->
|
TaBuildNullTransportAddress( ((PTRANSPORT_ADDRESS)SendReq->TdiConnection.RemoteAddress)->
|
||||||
Address[0].AddressType );
|
Address[0].AddressType );
|
||||||
|
@ -660,7 +664,7 @@ AfdPacketSocketWriteData(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ExFreePool(TargetAddress);
|
ExFreePoolWithTag(TargetAddress, TAG_AFD_TDI_CONNECTION_INFORMATION);
|
||||||
|
|
||||||
SocketStateUnlock(FCB);
|
SocketStateUnlock(FCB);
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,24 @@
|
||||||
#define IP_MIB_STATS_ID 1
|
#define IP_MIB_STATS_ID 1
|
||||||
#define IP_MIB_ADDRTABLE_ENTRY_ID 0x102
|
#define IP_MIB_ADDRTABLE_ENTRY_ID 0x102
|
||||||
|
|
||||||
|
#define TAG_AFD_DATA_BUFFER 'BdfA'
|
||||||
|
#define TAG_AFD_TRANSPORT_ADDRESS 'tdfA'
|
||||||
|
#define TAG_AFD_SOCKET_CONTEXT 'XdfA'
|
||||||
|
#define TAG_AFD_CONNECT_DATA 'cdfA'
|
||||||
|
#define TAG_AFD_DISCONNECT_DATA 'ddfA'
|
||||||
|
|
||||||
|
#define TAG_AFD_CONNECT_OPTIONS 'ocfA'
|
||||||
|
#define TAG_AFD_DISCONNECT_OPTIONS 'odfA'
|
||||||
|
#define TAG_AFD_ACCEPT_QUEUE 'qafA'
|
||||||
|
#define TAG_AFD_POLL_HANDLE 'hpfA'
|
||||||
|
#define TAG_AFD_FCB 'cffA'
|
||||||
|
#define TAG_AFD_ACTIVE_POLL 'pafA'
|
||||||
|
#define TAG_AFD_EA_INFO 'aefA'
|
||||||
|
#define TAG_AFD_STORED_DATAGRAM 'gsfA'
|
||||||
|
#define TAG_AFD_SNMP_ADDRESS_INFO 'asfA'
|
||||||
|
#define TAG_AFD_TDI_CONNECTION_INFORMATION 'cTfA'
|
||||||
|
#define TAG_AFD_WSA_BUFFER 'bWfA'
|
||||||
|
|
||||||
typedef struct IPADDR_ENTRY {
|
typedef struct IPADDR_ENTRY {
|
||||||
ULONG Addr;
|
ULONG Addr;
|
||||||
ULONG Index;
|
ULONG Index;
|
||||||
|
|
Loading…
Reference in a new issue