Author: cgutman
Date: Thu Dec 8 21:21:25 2011
New Revision: 54620
URL:
http://svn.reactos.org/svn/reactos?rev=54620&view=rev
Log:
[TCPIP]
- Fix IPPacket double free in IPSendDatagram failure case
Modified:
trunk/reactos/lib/drivers/ip/network/icmp.c
trunk/reactos/lib/drivers/ip/transport/rawip/rawip.c
trunk/reactos/lib/drivers/ip/transport/tcp/if.c
trunk/reactos/lib/drivers/ip/transport/udp/udp.c
Modified: trunk/reactos/lib/drivers/ip/network/icmp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/icm…
==============================================================================
--- trunk/reactos/lib/drivers/ip/network/icmp.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/network/icmp.c [iso-8859-1] Thu Dec 8 21:21:25 2011
@@ -23,29 +23,6 @@
return STATUS_SUCCESS;
}
-
-VOID SendICMPComplete(
- PVOID Context,
- PNDIS_PACKET Packet,
- NDIS_STATUS NdisStatus)
-/*
- * FUNCTION: ICMP datagram transmit completion handler
- * ARGUMENTS:
- * Context = Pointer to context infomation (IP_PACKET)
- * Packet = Pointer to NDIS packet
- * NdisStatus = Status of transmit operation
- * NOTES:
- * This routine is called by IP when a ICMP send completes
- */
-{
- TI_DbgPrint(DEBUG_ICMP, ("Freeing NDIS packet (%X).\n", Packet));
-
- /* Free packet */
- FreeNdisPacket(Packet);
-
- TI_DbgPrint(DEBUG_ICMP, ("Done\n"));
-}
-
BOOLEAN PrepareICMPPacket(
PADDRESS_FILE AddrFile,
@@ -219,10 +196,7 @@
Status = IPSendDatagram(&Packet, NCE);
if (!NT_SUCCESS(Status))
- {
- Packet.Free(&Packet);
return Status;
- }
*DataUsed = DataSize;
Modified: trunk/reactos/lib/drivers/ip/transport/rawip/rawip.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/r…
==============================================================================
--- trunk/reactos/lib/drivers/ip/transport/rawip/rawip.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/transport/rawip/rawip.c [iso-8859-1] Thu Dec 8 21:21:25
2011
@@ -254,10 +254,7 @@
Status = IPSendDatagram(&Packet, NCE);
if (!NT_SUCCESS(Status))
- {
- Packet.Free(&Packet);
return Status;
- }
*DataUsed = DataSize;
Modified: trunk/reactos/lib/drivers/ip/transport/tcp/if.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/t…
==============================================================================
--- trunk/reactos/lib/drivers/ip/transport/tcp/if.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/transport/tcp/if.c [iso-8859-1] Thu Dec 8 21:21:25 2011
@@ -61,10 +61,7 @@
NdisStatus = IPSendDatagram(&Packet, NCE);
if (!NT_SUCCESS(NdisStatus))
- {
- Packet.Free(&Packet);
return ERR_RTE;
- }
return 0;
}
Modified: trunk/reactos/lib/drivers/ip/transport/udp/udp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/u…
==============================================================================
--- trunk/reactos/lib/drivers/ip/transport/udp/udp.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/transport/udp/udp.c [iso-8859-1] Thu Dec 8 21:21:25
2011
@@ -230,10 +230,7 @@
Status = IPSendDatagram(&Packet, NCE);
if (!NT_SUCCESS(Status))
- {
- Packet.Free(&Packet);
return Status;
- }
*DataUsed = DataSize;