Author: cgutman
Date: Sun Aug 24 08:25:19 2008
New Revision: 35596
URL:
http://svn.reactos.org/svn/reactos?rev=35596&view=rev
Log:
- Fail if DatagramRecv->Address is NULL
Modified:
branches/aicom-network-fixes/drivers/network/afd/afd/read.c
Modified: branches/aicom-network-fixes/drivers/network/afd/afd/read.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/afd/afd/read.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/drivers/network/afd/afd/read.c [iso-8859-1] Sun Aug 24
08:25:19 2008
@@ -480,12 +480,16 @@
DatagramRecv->Address =
TaCopyTransportAddress( FCB->AddressFrom->RemoteAddress );
- InsertTailList( &FCB->DatagramList, &DatagramRecv->ListEntry );
+ if( !DatagramRecv->Address ) Status = STATUS_NO_MEMORY;
+
} else Status = STATUS_NO_MEMORY;
if( !NT_SUCCESS( Status ) ) {
+ if( DatagramRecv ) ExFreePool( DatagramRecv );
SocketStateUnlock( FCB );
return Status;
+ } else {
+ InsertTailList( &FCB->DatagramList, &DatagramRecv->ListEntry );
}
/* Satisfy as many requests as we can */