Author: cgutman
Date: Wed Sep 3 01:36:46 2008
New Revision: 35898
URL:
http://svn.reactos.org/svn/reactos?rev=35898&view=rev
Log:
- Move the NULL check immediately after the memory is allocated
Modified:
branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/if.c
Modified: branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/if.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
==============================================================================
--- branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/if.c [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/if.c [iso-8859-1] Wed Sep 3
01:36:46 2008
@@ -34,9 +34,9 @@
NTSTATUS Status;
POSK_IFADDR ifaddr = exAllocatePool
( NonPagedPool, sizeof(*ifaddr) + 2 * sizeof( struct sockaddr_in ) );
+ if( !ifaddr ) return NULL;
struct sockaddr_in *addr_in = (struct sockaddr_in *)&ifaddr[1];
struct sockaddr_in *dstaddr_in = (struct sockaddr_in *)&addr_in[1];
- if( !ifaddr ) return NULL;
TI_DbgPrint(DEBUG_TCPIF,("Called\n"));