Author: arty
Date: Tue Aug 19 07:39:46 2008
New Revision: 35449
URL: http://svn.reactos.org/svn/reactos?rev=35449&view=rev
Log:
Fix a leak when doing an immediate reply to a small packet (could be PSH|ACK
with < 50 bytes, ACK|FIN, RST or similar).
Modified:
trunk/reactos/lib/drivers/oskittcp/oskittcp/tcp_subr.c
Modified: trunk/reactos/lib/drivers/oskittcp/oskittcp/tcp_subr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/oskittcp/oskit…
==============================================================================
--- trunk/reactos/lib/drivers/oskittcp/oskittcp/tcp_subr.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/oskittcp/oskittcp/tcp_subr.c [iso-8859-1] Tue Aug 19 07:39:46 2008
@@ -163,6 +163,7 @@
tcp_seq ack, seq;
int flags;
{
+ struct mbuf *n;
register int tlen;
int win = 0;
struct route *ro = 0;
@@ -221,6 +222,18 @@
tcp_trace(TA_OUTPUT, 0, tp, ti, 0);
#endif
(void) ip_output(m, NULL, ro, 0, NULL);
+#ifdef __REACTOS__
+ /* We allocated m, so we are responsible for freeing it. If the mbuf
+ contains a pointer to an external datablock, we (or rather, m_copy)
+ didn't allocate it but pointed it to the data to send. So we have
+ to cheat a little bit and keep M_FREE from freeing the external
+ data block */
+ while (NULL != m) {
+ m->m_flags &= ~M_EXT;
+ MFREE(m, n);
+ m = n;
+ }
+#endif
}
/*
Author: tkreuzer
Date: Mon Aug 18 21:33:14 2008
New Revision: 35442
URL: http://svn.reactos.org/svn/reactos?rev=35442&view=rev
Log:
Get rid of the _X86_ define by using a -U compiler switch. This way it also works with PCHs, that before didn't like the #undef
Modified:
branches/ros-amd64-bringup/reactos/ReactOS-amd64.rbuild
Modified: branches/ros-amd64-bringup/reactos/ReactOS-amd64.rbuild
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/React…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ReactOS-amd64.rbuild [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ReactOS-amd64.rbuild [iso-8859-1] Mon Aug 18 21:33:14 2008
@@ -19,6 +19,7 @@
<property name="WINEBUILD_FLAGS" value="--kill-at"/>
<property name="NTOSKRNL_SHARED" value="-shared"/>
<linkerflag>-enable-stdcall-fixup</linkerflag>
+ <compilerflag>-U_X86_</compilerflag>
<if property="OPTIMIZE" value="1">
<compilerflag>-Os</compilerflag>