Author: cgutman
Date: Sat Jan 3 22:39:32 2009
New Revision: 38542
URL:
http://svn.reactos.org/svn/reactos?rev=38542&view=rev
Log:
- Merge r38358, r38539, and r38541
Modified:
trunk/reactos/drivers/network/afd/afd/listen.c
trunk/reactos/drivers/network/afd/afd/tdi.c
trunk/reactos/lib/drivers/ip/network/receive.c
Modified: trunk/reactos/drivers/network/afd/afd/listen.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/li…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/listen.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/listen.c [iso-8859-1] Sat Jan 3 22:39:32 2009
@@ -159,8 +159,16 @@
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 */
Modified: trunk/reactos/drivers/network/afd/afd/tdi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/td…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/tdi.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/tdi.c [iso-8859-1] Sat Jan 3 22:39:32 2009
@@ -420,21 +420,13 @@
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 */
Modified: trunk/reactos/lib/drivers/ip/network/receive.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/rec…
==============================================================================
--- trunk/reactos/lib/drivers/ip/network/receive.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/network/receive.c [iso-8859-1] Sat Jan 3 22:39:32 2009
@@ -250,8 +250,7 @@
__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 @@
TcpipReleaseSpinLock(Lock, OldIrql);
RemoveIPDR(IPDR);
FreeIPDR(IPDR);
- if (Buffer)
- exFreePool(Buffer);
}
@@ -375,7 +372,8 @@
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 @@
if ((FragLast < Hole->Last) && (MoreFragments)) {
/* We can reuse the descriptor for the new hole */
- Hole->First = FragLast + 1;
-
- /* Put the new hole descriptor in the list */
+ Hole->First = FragLast + 1;
+
+ /* Put the new hole descriptor in the list */
InsertTailList(&IPDR->HoleListHead, &Hole->ListEntry);
} else
TcpipFreeToNPagedLookasideList(&IPHoleList, Hole);
@@ -407,7 +405,7 @@
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 @@
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;
}