Author: cgutman
Date: Thu Aug 28 21:19:16 2008
New Revision: 35743
URL:
http://svn.reactos.org/svn/reactos?rev=35743&view=rev
Log:
- Free the address we've previously allocated if needed
Modified:
branches/aicom-network-fixes/drivers/network/afd/afd/bind.c
branches/aicom-network-fixes/drivers/network/afd/afd/connect.c
branches/aicom-network-fixes/drivers/network/afd/afd/listen.c
Modified: branches/aicom-network-fixes/drivers/network/afd/afd/bind.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/afd/afd/bind.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/drivers/network/afd/afd/bind.c [iso-8859-1] Thu Aug 28
21:19:16 2008
@@ -53,6 +53,7 @@
return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY,
Irp, 0, NULL );
+ if( FCB->LocalAddress ) ExFreePool( FCB->LocalAddress );
FCB->LocalAddress = TaCopyTransportAddress( &BindReq->Address );
if( FCB->LocalAddress )
Modified: branches/aicom-network-fixes/drivers/network/afd/afd/connect.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/afd/afd/connect.c [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/drivers/network/afd/afd/connect.c [iso-8859-1] Thu Aug 28
21:19:16 2008
@@ -166,6 +166,7 @@
return LeaveIrpUntilLater( FCB, Irp, FUNCTION_CONNECT );
case SOCKET_STATE_CREATED:
+ if( FCB->LocalAddress ) ExFreePool( FCB->LocalAddress );
FCB->LocalAddress =
TaCopyTransportAddress( &ConnectReq->RemoteAddress );
@@ -193,6 +194,7 @@
/* Drop through to SOCKET_STATE_BOUND */
case SOCKET_STATE_BOUND:
+ if( FCB->RemoteAddress ) ExFreePool( FCB->RemoteAddress );
FCB->RemoteAddress =
TaCopyTransportAddress( &ConnectReq->RemoteAddress );
Modified: branches/aicom-network-fixes/drivers/network/afd/afd/listen.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/afd/afd/listen.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/drivers/network/afd/afd/listen.c [iso-8859-1] Thu Aug 28
21:19:16 2008
@@ -28,6 +28,8 @@
FCB->State = SOCKET_STATE_CONNECTED;
FCB->Connection = Qelt->Object;
+
+ if( FCB->RemoteAddress ) ExFreePool( FCB->RemoteAddress );
FCB->RemoteAddress =
TaCopyTransportAddress( Qelt->ConnInfo->RemoteAddress );