[TCPIP]
authorJérôme Gardou <jerome.gardou@reactos.org>
Thu, 16 Oct 2014 20:15:33 +0000 (20:15 +0000)
committerJérôme Gardou <jerome.gardou@reactos.org>
Thu, 16 Oct 2014 20:15:33 +0000 (20:15 +0000)
 - Fix potential NULL pointer dereference

svn path=/trunk/; revision=64769

reactos/lib/drivers/ip/transport/tcp/tcp.c

index 5d013be..68b18f2 100644 (file)
@@ -679,8 +679,12 @@ TCPSetNoDelay(
     PCONNECTION_ENDPOINT Connection,
     BOOLEAN Set)
 {
+    if (!Connection)
+        return STATUS_UNSUCCESSFUL;
+
     if (Connection->SocketContext == NULL)
         return STATUS_UNSUCCESSFUL;
+
     LibTCPSetNoDelay(Connection->SocketContext, Set);
     return STATUS_SUCCESS;
 }