Author: cgutman
Date: Mon Aug 25 23:19:07 2008
New Revision: 35658
URL:
http://svn.reactos.org/svn/reactos?rev=35658&view=rev
Log:
- Merge r35656 from aicom-network-fixes
- Fixes more leaks during general network use
Modified:
trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c
Modified: trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/t…
==============================================================================
--- trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] Mon Aug 25 23:19:07
2008
@@ -89,8 +89,10 @@
if( Status == STATUS_PENDING ) {
InsertHeadList( &Connection->ListenRequest, &Bucket->Entry );
break;
- } else
+ } else {
Complete( Bucket->Request.RequestContext, Status, 0 );
+ PoolFreeBuffer( Bucket );
+ }
}
}
@@ -141,6 +143,7 @@
Complete( Bucket->Request.RequestContext,
STATUS_SUCCESS, Received );
+ PoolFreeBuffer( Bucket );
} else if( Status == STATUS_PENDING ) {
InsertHeadList
( &Connection->ReceiveRequest, &Bucket->Entry );
@@ -150,6 +153,7 @@
("Completing Receive request: %x %x\n",
Bucket->Request, Status));
Complete( Bucket->Request.RequestContext, Status, 0 );
+ PoolFreeBuffer( Bucket );
}
}
}
@@ -198,6 +202,7 @@
Complete( Bucket->Request.RequestContext,
STATUS_SUCCESS, Sent );
+ PoolFreeBuffer( Bucket );
} else if( Status == STATUS_PENDING ) {
InsertHeadList
( &Connection->SendRequest, &Bucket->Entry );
@@ -207,6 +212,7 @@
("Completing Send request: %x %x\n",
Bucket->Request, Status));
Complete( Bucket->Request.RequestContext, Status, 0 );
+ PoolFreeBuffer( Bucket );
}
}
}
@@ -225,13 +231,15 @@
ListsToErase[2] = &Connection->ConnectRequest;
IrpStatus [2] = STATUS_UNSUCCESSFUL;
ListsToErase[3] = 0;
+ IrpStatus [3] = 0;
for( i = 0; ListsToErase[i]; i++ ) {
while( !IsListEmpty( ListsToErase[i] ) ) {
Entry = RemoveHeadList( ListsToErase[i] );
Bucket = CONTAINING_RECORD( Entry, TDI_BUCKET, Entry );
Complete = Bucket->Request.RequestNotifyObject;
- Complete( Bucket->Request.RequestContext, STATUS_SUCCESS, 0 );
+ Complete( Bucket->Request.RequestContext, IrpStatus[i], 0 );
+ PoolFreeBuffer( Bucket );
}
}
}