- Fail if TCPSocket doesn't complete successfully
authorCameron Gutman <aicommander@gmail.com>
Fri, 19 Sep 2008 04:38:25 +0000 (04:38 +0000)
committerCameron Gutman <aicommander@gmail.com>
Fri, 19 Sep 2008 04:38:25 +0000 (04:38 +0000)
svn path=/branches/aicom-network-fixes/; revision=36311

drivers/network/tcpip/tcpip/fileobjs.c

index 546df6f..054dd98 100644 (file)
@@ -409,6 +409,11 @@ NTSTATUS FileOpenConnection(
 
   Status = TCPSocket( Connection, AF_INET, SOCK_STREAM, IPPROTO_TCP );
 
+  if( !NT_SUCCESS(Status) ) {
+      TCPFreeConnectionEndpoint( Connection );
+      return Status;
+  }
+
   /* Return connection endpoint file object */
   Request->Handle.ConnectionContext = Connection;