Author: cgutman Date: Fri Oct 17 05:29:14 2008 New Revision: 36785
URL: http://svn.reactos.org/svn/reactos?rev=36785&view=rev Log: - Fix the order that we shutdown things
Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/main.c
Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/main.c URL: http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/netw... ============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/tcpip/main.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/tcpip/main.c [iso-8859-1] Fri Oct 17 05:29:14 2008 @@ -783,6 +783,7 @@ /* Initialize transport level protocol subsystems */ Status = RawIPStartup(); if( !NT_SUCCESS(Status) ) { + IPShutdown(); ChewShutdown(); IoDeleteDevice(IPDeviceObject); IoDeleteDevice(RawIPDeviceObject); @@ -791,12 +792,13 @@ ExFreePool(EntityList); NdisFreePacketPool(GlobalPacketPool); NdisFreeBufferPool(GlobalBufferPool); - IPShutdown(); return Status; }
Status = UDPStartup(); if( !NT_SUCCESS(Status) ) { + RawIPShutdown(); + IPShutdown(); ChewShutdown(); IoDeleteDevice(IPDeviceObject); IoDeleteDevice(RawIPDeviceObject); @@ -805,13 +807,14 @@ ExFreePool(EntityList); NdisFreePacketPool(GlobalPacketPool); NdisFreeBufferPool(GlobalBufferPool); - IPShutdown(); - RawIPShutdown(); return Status; }
Status = TCPStartup(); if( !NT_SUCCESS(Status) ) { + UDPShutdown(); + RawIPShutdown(); + IPShutdown(); ChewShutdown(); IoDeleteDevice(IPDeviceObject); IoDeleteDevice(RawIPDeviceObject); @@ -820,9 +823,6 @@ ExFreePool(EntityList); NdisFreePacketPool(GlobalPacketPool); NdisFreeBufferPool(GlobalBufferPool); - IPShutdown(); - RawIPShutdown(); - UDPShutdown(); return Status; }
@@ -842,6 +842,11 @@ NULL, 0, NULL); + LANShutdown(); + TCPShutdown(); + UDPShutdown(); + RawIPShutdown(); + IPShutdown(); ChewShutdown(); IoDeleteDevice(IPDeviceObject); IoDeleteDevice(RawIPDeviceObject); @@ -850,11 +855,6 @@ ExFreePool(EntityList); NdisFreePacketPool(GlobalPacketPool); NdisFreeBufferPool(GlobalBufferPool); - IPShutdown(); - RawIPShutdown(); - UDPShutdown(); - TCPShutdown(); - LANShutdown(); return Status; }
@@ -862,6 +862,11 @@ Status = LoopRegisterAdapter(NULL, NULL); if (!NT_SUCCESS(Status)) { TI_DbgPrint(MIN_TRACE, ("Failed to create loopback adapter. Status (0x%X).\n", Status)); + LANShutdown(); + TCPShutdown(); + UDPShutdown(); + RawIPShutdown(); + IPShutdown(); ChewShutdown(); IoDeleteDevice(IPDeviceObject); IoDeleteDevice(RawIPDeviceObject); @@ -870,11 +875,6 @@ ExFreePool(EntityList); NdisFreePacketPool(GlobalPacketPool); NdisFreeBufferPool(GlobalBufferPool); - IPShutdown(); - RawIPShutdown(); - UDPShutdown(); - TCPShutdown(); - LANShutdown(); LANUnregisterProtocol(); return Status; }