- Merge r38358, r38539, and r38541

svn path=/trunk/; revision=38542
This commit is contained in:
Cameron Gutman 2009-01-04 04:39:32 +00:00
parent b470703879
commit 831afe52e7
3 changed files with 18 additions and 19 deletions

View file

@ -159,8 +159,16 @@ static NTSTATUS NTAPI ListenComplete
ListEntry ) );
}
if( FCB->ListenIrp.ConnectionCallInfo ) ExFreePool( FCB->ListenIrp.ConnectionCallInfo );
if( FCB->ListenIrp.ConnectionReturnInfo ) ExFreePool( FCB->ListenIrp.ConnectionReturnInfo );
if( FCB->ListenIrp.ConnectionCallInfo ) {
ExFreePool( FCB->ListenIrp.ConnectionCallInfo );
FCB->ListenIrp.ConnectionCallInfo = NULL;
}
if( FCB->ListenIrp.ConnectionReturnInfo ) {
ExFreePool( FCB->ListenIrp.ConnectionReturnInfo );
FCB->ListenIrp.ConnectionReturnInfo = NULL;
}
FCB->NeedsNewListen = TRUE;
/* Trigger a select return if appropriate */

View file

@ -420,21 +420,13 @@ NTSTATUS TdiListen
return STATUS_INVALID_PARAMETER;
}
Status = TdiBuildNullConnectionInfo(RequestConnectionInfo,
TDI_ADDRESS_TYPE_IP);
if (!NT_SUCCESS(Status))
return Status;
*Irp = TdiBuildInternalDeviceControlIrp(TDI_LISTEN, /* Sub function */
DeviceObject, /* Device object */
ConnectionObject, /* File object */
NULL, /* Event */
Iosb); /* Status */
if (*Irp == NULL)
{
ExFreePool(*RequestConnectionInfo);
return STATUS_INSUFFICIENT_RESOURCES;
}
TdiBuildListen(*Irp, /* IRP */
DeviceObject, /* Device object */

View file

@ -250,8 +250,7 @@ PIP_PACKET ReassembleDatagram(
__inline VOID Cleanup(
PKSPIN_LOCK Lock,
KIRQL OldIrql,
PIPDATAGRAM_REASSEMBLY IPDR,
PVOID Buffer OPTIONAL)
PIPDATAGRAM_REASSEMBLY IPDR)
/*
* FUNCTION: Performs cleaning operations on errors
* ARGUMENTS:
@ -266,8 +265,6 @@ __inline VOID Cleanup(
TcpipReleaseSpinLock(Lock, OldIrql);
RemoveIPDR(IPDR);
FreeIPDR(IPDR);
if (Buffer)
exFreePool(Buffer);
}
@ -375,7 +372,8 @@ VOID ProcessFragment(
NewHole = CreateHoleDescriptor(Hole->First, FragLast - 1);
if (!NewHole) {
/* We don't have the resources to process this packet, discard it */
Cleanup(&IPDR->Lock, OldIrql, IPDR, Hole);
exFreeToNPagedLookasideList(&IPHoleList, Hole);
Cleanup(&IPDR->Lock, OldIrql, IPDR);
return;
}
@ -385,9 +383,9 @@ VOID ProcessFragment(
if ((FragLast < Hole->Last) && (MoreFragments)) {
/* We can reuse the descriptor for the new hole */
Hole->First = FragLast + 1;
Hole->First = FragLast + 1;
/* Put the new hole descriptor in the list */
/* Put the new hole descriptor in the list */
InsertTailList(&IPDR->HoleListHead, &Hole->ListEntry);
} else
TcpipFreeToNPagedLookasideList(&IPHoleList, Hole);
@ -407,7 +405,7 @@ VOID ProcessFragment(
Fragment = TcpipAllocateFromNPagedLookasideList(&IPFragmentList);
if (!Fragment) {
/* We don't have the resources to process this packet, discard it */
Cleanup(&IPDR->Lock, OldIrql, IPDR, NULL);
Cleanup(&IPDR->Lock, OldIrql, IPDR);
return;
}
@ -417,7 +415,8 @@ VOID ProcessFragment(
Fragment->Data = exAllocatePool(NonPagedPool, Fragment->Size);
if (!Fragment->Data) {
/* We don't have the resources to process this packet, discard it */
Cleanup(&IPDR->Lock, OldIrql, IPDR, Fragment);
exFreeToNPagedLookasideList(&IPFragmentList, Fragment);
Cleanup(&IPDR->Lock, OldIrql, IPDR);
return;
}