From 0b7d92c4b3ec4021cde6d4c9da1082e3154fa9b2 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 19 Sep 2008 04:38:25 +0000 Subject: [PATCH] - Fail if TCPSocket doesn't complete successfully svn path=/branches/aicom-network-fixes/; revision=36311 --- drivers/network/tcpip/tcpip/fileobjs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/network/tcpip/tcpip/fileobjs.c b/drivers/network/tcpip/tcpip/fileobjs.c index 546df6f782d..054dd981701 100644 --- a/drivers/network/tcpip/tcpip/fileobjs.c +++ b/drivers/network/tcpip/tcpip/fileobjs.c @@ -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;